vue-data-ui 3.25.5 → 3.25.6
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/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-ta2JoIjx.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-DETHvNhl.js} +1 -1
- 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 +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DhwySwgn.js} +380 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-C_inEafb.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-Bs2mBur5.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-DXIHhp-G.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-DqsVJkmO.js} +470 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-Dd1qfUiu.js} +376 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +407 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BZq517pL.js} +4 -4
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-D0_KsB-y.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-BOBHo7-L.js} +524 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,2415 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Ft as i, K as a, Lt as o, Mt as s, Pt as c, S as l, Ut as u, Wt as ee, X as d, Yt as te, Zt as f, b as ne, f as p, h as re, ht as ie, i as m, j as ae, nt as oe, ot as se, p as ce, q as le, s as ue, st as de, t as fe, tt as pe, w as me } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as he, t as ge } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as _e } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as ve } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as ye, t as be } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as xe } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as Se } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as Ce } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as we } from "./img-DhGApYG0.js";
|
|
11
|
+
import { n as Te } from "./Title-CPHi-evi.js";
|
|
12
|
+
import { t as Ee } from "./Shape-CIqU-p2F.js";
|
|
13
|
+
import { t as De } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import { l as Oe, t as ke } from "./useResponsive-ZtArZtUf.js";
|
|
15
|
+
import { t as Ae } from "./DefGrad-DVBqDjhO.js";
|
|
16
|
+
import { t as je } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
17
|
+
import { t as Me } from "./A11yDataTable-DdRsVULz.js";
|
|
18
|
+
import { t as Ne } from "./useUserOptionState-DK-_1ddE.js";
|
|
19
|
+
import { t as Pe } from "./useChartAccessibility-DYqac8yF.js";
|
|
20
|
+
import { n as Fe, t as Ie } from "./labelUtils-BXX2NzRe.js";
|
|
21
|
+
import { t as Le } from "./vue_ui_donut-BDGqG07h.js";
|
|
22
|
+
import { t as Re } from "./Legend-X4kF4PvW.js";
|
|
23
|
+
import { Fragment as h, Teleport as ze, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as Be, createTextVNode as Ve, createVNode as He, defineAsyncComponent as Ue, guardReactiveProps as x, mergeProps as We, nextTick as Ge, normalizeClass as Ke, normalizeProps as S, normalizeStyle as C, onBeforeUnmount as qe, onMounted as Je, openBlock as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as Ye, shallowRef as Xe, toDisplayString as O, toRefs as Ze, unref as k, useSlots as Qe, vShow as $e, watch as et, withCtx as A, withDirectives as tt } from "vue";
|
|
24
|
+
//#region src/useSmallArcLayouts.js
|
|
25
|
+
function nt(e) {
|
|
26
|
+
let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: ee, isSmallArc: d } = e;
|
|
27
|
+
return { smallArcLayoutsClassic: g(() => {
|
|
28
|
+
if (t.value.type !== "classic") return {};
|
|
29
|
+
let e = {}, te = n.value || [];
|
|
30
|
+
if (!te.length) return e;
|
|
31
|
+
let f = r.value.width / 2, ne = r.value.height / 2, p = i.value.top + 16, re = r.value.height - i.value.bottom - 16, ie = a.value, m = ie / 3, ae = ie * 1.5, oe = f - (o.value + 6), se = f + (o.value + 6), ce = !!t.value.style.chart.layout.curvedMarkers;
|
|
32
|
+
function le({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
33
|
+
if (!ce) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
|
|
34
|
+
let i = n < f ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - f, l = t - ne, u = Math.sqrt(c * c + l * l) || 1, ee = c / u, d = l / u, te = u + 9;
|
|
35
|
+
function p({ x: e, y: t }) {
|
|
36
|
+
let n = e - f, r = t - ne, i = Math.sqrt(n * n + r * r) || 1;
|
|
37
|
+
if (i >= te) return {
|
|
38
|
+
x: e,
|
|
39
|
+
y: t
|
|
40
|
+
};
|
|
41
|
+
let a = te / i;
|
|
42
|
+
return {
|
|
43
|
+
x: f + n * a,
|
|
44
|
+
y: ne + r * a
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (s < 56) {
|
|
48
|
+
let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, te = (t + r) * .5, re = u + c, ie = te + l, m = (re - f) * (re - f) + (ie - ne) * (ie - ne), ae = u - c, oe = te - l;
|
|
49
|
+
(ae - f) * (ae - f) + (oe - ne) * (oe - ne) > m && (c = -c, l = -l);
|
|
50
|
+
let se = .78, ce = e + a * se, le = t + o * se, ue = Math.max(0, Math.min(1, (s - 18) / 44)), de = ue * ue * (3 - 2 * ue), fe = 2.5 + de * 4, pe = 1 + de * 2.5;
|
|
51
|
+
fe *= .9;
|
|
52
|
+
let me = p({
|
|
53
|
+
x: ce + c * fe + ee * pe,
|
|
54
|
+
y: le + l * fe + d * pe
|
|
55
|
+
});
|
|
56
|
+
return `M ${e} ${t} Q ${me.x} ${me.y} ${n} ${r}`;
|
|
57
|
+
}
|
|
58
|
+
let re = s * .34;
|
|
59
|
+
re < 20 && (re = 20), re > 46 && (re = 46);
|
|
60
|
+
let ie = s * .46;
|
|
61
|
+
ie < 22 && (ie = 22), ie > 70 && (ie = 70);
|
|
62
|
+
let m = {
|
|
63
|
+
x: e + ee * re,
|
|
64
|
+
y: t + d * re
|
|
65
|
+
}, ae = f + i * Math.max(Math.abs(n - f), te), oe = {
|
|
66
|
+
x: n - i * Math.min(ie, Math.abs(ae - n) * .75),
|
|
67
|
+
y: r
|
|
68
|
+
}, se = p(m), le = p(oe);
|
|
69
|
+
return `M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`;
|
|
70
|
+
}
|
|
71
|
+
function ue(e) {
|
|
72
|
+
let t = String(e ?? "").split(/\n/g), n = Math.max(0, t.length - 1) * (ie * 1.2);
|
|
73
|
+
return ae + n;
|
|
74
|
+
}
|
|
75
|
+
function de({ arc: e, index: t }) {
|
|
76
|
+
let { x: n, y: r } = s(e.path);
|
|
77
|
+
return {
|
|
78
|
+
arc: e,
|
|
79
|
+
index: t,
|
|
80
|
+
midX: n,
|
|
81
|
+
midY: r,
|
|
82
|
+
inlineMarkerX: c(e).x,
|
|
83
|
+
inlineMarkerY: l(e) - 3.5,
|
|
84
|
+
labelHeight: ue(e.name)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function fe(e) {
|
|
88
|
+
let { arc: t } = e, n = t.seriesIndex ?? 0;
|
|
89
|
+
return u.value === n || ee.value.includes(n) ? !1 : d(t, n);
|
|
90
|
+
}
|
|
91
|
+
function pe(e) {
|
|
92
|
+
let t = e.inlineMarkerY < ne, n = e.inlineMarkerX < f;
|
|
93
|
+
return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
|
|
94
|
+
}
|
|
95
|
+
function me(e, t) {
|
|
96
|
+
if (t.startsWith("T")) {
|
|
97
|
+
e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
|
|
101
|
+
}
|
|
102
|
+
function he({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
|
|
103
|
+
return {
|
|
104
|
+
side: e,
|
|
105
|
+
labelX: e === "left" ? t - 8 : t + 8,
|
|
106
|
+
labelY: r + m,
|
|
107
|
+
textAnchor: e === "left" ? "end" : "start",
|
|
108
|
+
markerX: t,
|
|
109
|
+
markerY: n,
|
|
110
|
+
connectorPath: i
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function ge({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
|
|
114
|
+
let o = i;
|
|
115
|
+
t.forEach((t) => {
|
|
116
|
+
let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
|
|
117
|
+
a === "down" ? (u = o, o += l) : (o -= l, u = o);
|
|
118
|
+
let ee = u, d = le({
|
|
119
|
+
midX: s,
|
|
120
|
+
midY: c,
|
|
121
|
+
bandX: r,
|
|
122
|
+
bandY: ee
|
|
123
|
+
});
|
|
124
|
+
e[i] = he({
|
|
125
|
+
side: n,
|
|
126
|
+
markerX: r,
|
|
127
|
+
markerY: ee,
|
|
128
|
+
labelY: u,
|
|
129
|
+
connectorPath: d
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
let _e = te.map((e, t) => de({
|
|
134
|
+
arc: e,
|
|
135
|
+
index: t
|
|
136
|
+
})).filter(fe), ve = {
|
|
137
|
+
TL: [],
|
|
138
|
+
TR: [],
|
|
139
|
+
BL: [],
|
|
140
|
+
BR: []
|
|
141
|
+
};
|
|
142
|
+
return _e.forEach((e) => {
|
|
143
|
+
ve[pe(e)].push(e);
|
|
144
|
+
}), Object.keys(ve).forEach((e) => {
|
|
145
|
+
me(ve[e], e);
|
|
146
|
+
}), ge({
|
|
147
|
+
candidateList: ve.TL,
|
|
148
|
+
side: "left",
|
|
149
|
+
bandMarkerX: oe,
|
|
150
|
+
startY: p,
|
|
151
|
+
direction: "down"
|
|
152
|
+
}), ge({
|
|
153
|
+
candidateList: ve.TR,
|
|
154
|
+
side: "right",
|
|
155
|
+
bandMarkerX: se,
|
|
156
|
+
startY: p,
|
|
157
|
+
direction: "down"
|
|
158
|
+
}), ve.BL.length > 1 && ge({
|
|
159
|
+
candidateList: ve.BL,
|
|
160
|
+
side: "left",
|
|
161
|
+
bandMarkerX: oe,
|
|
162
|
+
startY: re,
|
|
163
|
+
direction: "up"
|
|
164
|
+
}), ve.BR.length > 1 && ge({
|
|
165
|
+
candidateList: ve.BR,
|
|
166
|
+
side: "right",
|
|
167
|
+
bandMarkerX: se,
|
|
168
|
+
startY: re,
|
|
169
|
+
direction: "up"
|
|
170
|
+
}), e;
|
|
171
|
+
}) };
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/components/vue-ui-donut.vue
|
|
175
|
+
var rt = /* @__PURE__ */ e({ default: () => vn }), it = ["id"], at = ["id"], ot = ["id"], st = { style: { position: "relative" } }, ct = [
|
|
176
|
+
"xmlns",
|
|
177
|
+
"aria-describedby",
|
|
178
|
+
"viewBox"
|
|
179
|
+
], lt = ["width", "height"], ut = { key: 1 }, dt = { key: 2 }, ft = ["id"], pt = ["id"], mt = ["id"], ht = ["flood-color"], gt = ["id"], _t = ["flood-color"], vt = [
|
|
180
|
+
"d",
|
|
181
|
+
"stroke",
|
|
182
|
+
"filter"
|
|
183
|
+
], yt = [
|
|
184
|
+
"d",
|
|
185
|
+
"stroke",
|
|
186
|
+
"filter"
|
|
187
|
+
], bt = [
|
|
188
|
+
"cx",
|
|
189
|
+
"cy",
|
|
190
|
+
"r",
|
|
191
|
+
"fill",
|
|
192
|
+
"filter"
|
|
193
|
+
], xt = { key: 6 }, St = ["stroke", "d"], Ct = [
|
|
194
|
+
"d",
|
|
195
|
+
"fill",
|
|
196
|
+
"stroke",
|
|
197
|
+
"stroke-width",
|
|
198
|
+
"filter"
|
|
199
|
+
], wt = { key: 0 }, Tt = [
|
|
200
|
+
"d",
|
|
201
|
+
"fill",
|
|
202
|
+
"stroke",
|
|
203
|
+
"stroke-width",
|
|
204
|
+
"filter"
|
|
205
|
+
], Et = { key: 0 }, Dt = ["stroke", "d"], Ot = { key: 0 }, kt = [
|
|
206
|
+
"d",
|
|
207
|
+
"stroke",
|
|
208
|
+
"stroke-width",
|
|
209
|
+
"filter"
|
|
210
|
+
], At = { key: 1 }, jt = [
|
|
211
|
+
"d",
|
|
212
|
+
"fill",
|
|
213
|
+
"stroke",
|
|
214
|
+
"stroke-width",
|
|
215
|
+
"filter"
|
|
216
|
+
], Mt = [
|
|
217
|
+
"d",
|
|
218
|
+
"fill",
|
|
219
|
+
"stroke",
|
|
220
|
+
"stroke-width",
|
|
221
|
+
"filter"
|
|
222
|
+
], Nt = { key: 1 }, Pt = [
|
|
223
|
+
"cx",
|
|
224
|
+
"cy",
|
|
225
|
+
"r",
|
|
226
|
+
"fill",
|
|
227
|
+
"stroke",
|
|
228
|
+
"stroke-width"
|
|
229
|
+
], Ft = [
|
|
230
|
+
"cx",
|
|
231
|
+
"cy",
|
|
232
|
+
"r",
|
|
233
|
+
"fill",
|
|
234
|
+
"stroke",
|
|
235
|
+
"stroke-width"
|
|
236
|
+
], It = { key: 0 }, Lt = [
|
|
237
|
+
"d",
|
|
238
|
+
"fill",
|
|
239
|
+
"stroke",
|
|
240
|
+
"stroke-width"
|
|
241
|
+
], Rt = [
|
|
242
|
+
"cx",
|
|
243
|
+
"cy",
|
|
244
|
+
"r",
|
|
245
|
+
"stroke"
|
|
246
|
+
], zt = [
|
|
247
|
+
"cx",
|
|
248
|
+
"cy",
|
|
249
|
+
"r",
|
|
250
|
+
"fill"
|
|
251
|
+
], Bt = [
|
|
252
|
+
"cx",
|
|
253
|
+
"cy",
|
|
254
|
+
"r"
|
|
255
|
+
], Vt = { key: 0 }, Ht = [
|
|
256
|
+
"d",
|
|
257
|
+
"stroke",
|
|
258
|
+
"fill",
|
|
259
|
+
"onMouseenter",
|
|
260
|
+
"onMouseleave",
|
|
261
|
+
"onClick"
|
|
262
|
+
], Ut = { key: 1 }, Wt = [
|
|
263
|
+
"cx",
|
|
264
|
+
"cy",
|
|
265
|
+
"r"
|
|
266
|
+
], Gt = [
|
|
267
|
+
"x",
|
|
268
|
+
"y",
|
|
269
|
+
"fill",
|
|
270
|
+
"font-size"
|
|
271
|
+
], Kt = [
|
|
272
|
+
"x",
|
|
273
|
+
"y",
|
|
274
|
+
"fill",
|
|
275
|
+
"font-size"
|
|
276
|
+
], qt = [
|
|
277
|
+
"x",
|
|
278
|
+
"y",
|
|
279
|
+
"fill",
|
|
280
|
+
"font-size"
|
|
281
|
+
], Jt = [
|
|
282
|
+
"x",
|
|
283
|
+
"y",
|
|
284
|
+
"fill",
|
|
285
|
+
"font-size"
|
|
286
|
+
], Yt = ["filter", "opacity"], Xt = { key: 0 }, Zt = ["x", "y"], Qt = { key: 1 }, $t = [
|
|
287
|
+
"cx",
|
|
288
|
+
"cy",
|
|
289
|
+
"fill",
|
|
290
|
+
"stroke",
|
|
291
|
+
"filter",
|
|
292
|
+
"onClick",
|
|
293
|
+
"onMouseenter",
|
|
294
|
+
"onMouseleave"
|
|
295
|
+
], en = [
|
|
296
|
+
"text-anchor",
|
|
297
|
+
"x",
|
|
298
|
+
"y",
|
|
299
|
+
"onClick",
|
|
300
|
+
"onMouseenter",
|
|
301
|
+
"onMouseleave",
|
|
302
|
+
"innerHTML"
|
|
303
|
+
], tn = [
|
|
304
|
+
"text-anchor",
|
|
305
|
+
"x",
|
|
306
|
+
"y",
|
|
307
|
+
"fill",
|
|
308
|
+
"font-size",
|
|
309
|
+
"onClick",
|
|
310
|
+
"onMouseenter",
|
|
311
|
+
"onMouseleave"
|
|
312
|
+
], nn = [
|
|
313
|
+
"text-anchor",
|
|
314
|
+
"x",
|
|
315
|
+
"y",
|
|
316
|
+
"fill",
|
|
317
|
+
"font-size",
|
|
318
|
+
"onClick",
|
|
319
|
+
"onMouseenter",
|
|
320
|
+
"onMouseleave",
|
|
321
|
+
"innerHTML"
|
|
322
|
+
], rn = [
|
|
323
|
+
"cx",
|
|
324
|
+
"cy",
|
|
325
|
+
"fill",
|
|
326
|
+
"stroke",
|
|
327
|
+
"filter",
|
|
328
|
+
"onClick",
|
|
329
|
+
"onMouseenter",
|
|
330
|
+
"onMouseleave"
|
|
331
|
+
], an = [
|
|
332
|
+
"text-anchor",
|
|
333
|
+
"x",
|
|
334
|
+
"y",
|
|
335
|
+
"onClick",
|
|
336
|
+
"onMouseenter",
|
|
337
|
+
"onMouseleave",
|
|
338
|
+
"innerHTML"
|
|
339
|
+
], on = [
|
|
340
|
+
"text-anchor",
|
|
341
|
+
"x",
|
|
342
|
+
"y",
|
|
343
|
+
"fill",
|
|
344
|
+
"font-size",
|
|
345
|
+
"onClick",
|
|
346
|
+
"onMouseenter",
|
|
347
|
+
"onMouseleave"
|
|
348
|
+
], sn = [
|
|
349
|
+
"text-anchor",
|
|
350
|
+
"x",
|
|
351
|
+
"y",
|
|
352
|
+
"fill",
|
|
353
|
+
"font-size",
|
|
354
|
+
"onClick",
|
|
355
|
+
"onMouseenter",
|
|
356
|
+
"onMouseleave",
|
|
357
|
+
"innerHTML"
|
|
358
|
+
], cn = { key: 2 }, ln = [
|
|
359
|
+
"x",
|
|
360
|
+
"y",
|
|
361
|
+
"width"
|
|
362
|
+
], un = [
|
|
363
|
+
"x",
|
|
364
|
+
"y",
|
|
365
|
+
"width"
|
|
366
|
+
], dn = {
|
|
367
|
+
key: 0,
|
|
368
|
+
style: {
|
|
369
|
+
position: "absolute",
|
|
370
|
+
top: "100%",
|
|
371
|
+
left: "0",
|
|
372
|
+
width: "100%"
|
|
373
|
+
},
|
|
374
|
+
"data-dom-to-png-ignore": "",
|
|
375
|
+
"aria-hidden": "true"
|
|
376
|
+
}, fn = {
|
|
377
|
+
key: 5,
|
|
378
|
+
class: "vue-data-ui-watermark"
|
|
379
|
+
}, pn = ["id"], mn = ["onClick"], hn = {
|
|
380
|
+
key: 8,
|
|
381
|
+
class: "vue-ui-donut-hollow"
|
|
382
|
+
}, gn = { key: 0 }, _n = { key: 1 }, vn = /*#__PURE__*/ De({
|
|
383
|
+
__name: "vue-ui-donut",
|
|
384
|
+
props: {
|
|
385
|
+
config: {
|
|
386
|
+
type: Object,
|
|
387
|
+
default() {
|
|
388
|
+
return {};
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
dataset: {
|
|
392
|
+
type: Array,
|
|
393
|
+
default() {
|
|
394
|
+
return [];
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
emits: [
|
|
399
|
+
"selectLegend",
|
|
400
|
+
"selectDatapoint",
|
|
401
|
+
"copyAlt"
|
|
402
|
+
],
|
|
403
|
+
setup(e, { expose: De, emit: rt }) {
|
|
404
|
+
let vn = Ue(() => import("./Tooltip-hhrkQ3Lk.js")), yn = Ue(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), bn = Ue(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), xn = Ue(() => import("./DataTable-oiM9uWrQ.js")), Sn = Ue(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Cn = Ue(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), wn = Ue(() => import("./PackageVersion-ur6jKRL5.js").then((e) => e.t)), Tn = Ue(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_donut: En } = _e(), { isThemeValid: Dn, warnInvalidTheme: On } = Se(), kn = Qe(), j = e, An = g({
|
|
405
|
+
get() {
|
|
406
|
+
return !!j.dataset && j.dataset.length;
|
|
407
|
+
},
|
|
408
|
+
set(e) {
|
|
409
|
+
return e;
|
|
410
|
+
}
|
|
411
|
+
}), M = Xe(null), jn = T(null), Mn = T(null), Nn = T(null), Pn = Xe(null), Fn = Xe(null), In = Xe(null), Ln = Xe(null), Rn = Xe(null), zn = Xe(null), Bn = T(0), Vn = T(0), Hn = T(0), Un = T(!1), Wn = T(null), Gn = T(null), Kn = T(null), qn = T({
|
|
412
|
+
x: 0,
|
|
413
|
+
y: 0
|
|
414
|
+
}), Jn = T("pointer"), Yn = T(!1), Xn = g({
|
|
415
|
+
get: () => I.value.style.chart.layout.labels.percentage.fontSize,
|
|
416
|
+
set: (e) => e
|
|
417
|
+
}), N = g({
|
|
418
|
+
get: () => I.value.style.chart.layout.labels.name.fontSize,
|
|
419
|
+
set: (e) => e
|
|
420
|
+
}), Zn = g({
|
|
421
|
+
get: () => I.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
|
|
422
|
+
set: (e) => e
|
|
423
|
+
}), Qn = !1, $n = () => {
|
|
424
|
+
!I.value.autoSize || Qn || (Qn = !0, requestAnimationFrame(() => {
|
|
425
|
+
Qn = !1;
|
|
426
|
+
let e = I.value, t = jn.value, n = V.value;
|
|
427
|
+
if (!e.autoSize || !t || !n) return;
|
|
428
|
+
let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
|
|
429
|
+
x: r,
|
|
430
|
+
y: i,
|
|
431
|
+
width: a,
|
|
432
|
+
height: o
|
|
433
|
+
}, c = [
|
|
434
|
+
{
|
|
435
|
+
selector: ".vue-data-ui-datalabel-value",
|
|
436
|
+
baseSize: L.value.percentage.fontSize,
|
|
437
|
+
minSize: L.value.percentage.minFontSize,
|
|
438
|
+
sizeRef: Xn
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
selector: ".vue-data-ui-datalabel-name",
|
|
442
|
+
baseSize: L.value.name.fontSize,
|
|
443
|
+
minSize: L.value.name.minFontSize,
|
|
444
|
+
sizeRef: N
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
selector: ".vue-data-ui-datalabel-inline",
|
|
448
|
+
baseSize: L.value.dataLabels.smallArcClusterFontSize,
|
|
449
|
+
minSize: L.value.name.minFontSize,
|
|
450
|
+
sizeRef: Zn
|
|
451
|
+
}
|
|
452
|
+
];
|
|
453
|
+
c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
|
|
454
|
+
t.querySelectorAll(e).forEach((e) => {
|
|
455
|
+
i.value = ue({
|
|
456
|
+
el: e,
|
|
457
|
+
bounds: s,
|
|
458
|
+
currentFontSize: n,
|
|
459
|
+
minFontSize: r,
|
|
460
|
+
attempts: 200,
|
|
461
|
+
padding: 1
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
}));
|
|
466
|
+
};
|
|
467
|
+
Je(async () => {
|
|
468
|
+
Un.value = !0, nr(), requestAnimationFrame($n);
|
|
469
|
+
});
|
|
470
|
+
let er;
|
|
471
|
+
Je(() => {
|
|
472
|
+
M.value && (er = new ResizeObserver((e) => {
|
|
473
|
+
for (let t of e) {
|
|
474
|
+
let { width: e, height: n } = t.contentRect;
|
|
475
|
+
if (e > 0 && n > 0) {
|
|
476
|
+
$n();
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}), er.observe(M.value.parentElement));
|
|
481
|
+
}), qe(() => {
|
|
482
|
+
er?.disconnect();
|
|
483
|
+
}), qe(() => {
|
|
484
|
+
In.value && (Ln.value && In.value.unobserve(Ln.value), In.value.disconnect());
|
|
485
|
+
});
|
|
486
|
+
let tr = g(() => I.value.debug);
|
|
487
|
+
function nr() {
|
|
488
|
+
if (c(j.dataset) ? (oe({
|
|
489
|
+
componentName: "VueUiDonut",
|
|
490
|
+
type: "dataset",
|
|
491
|
+
debug: tr.value
|
|
492
|
+
}), An.value = !1, fr.value = !0) : (j.dataset.forEach((e, t) => {
|
|
493
|
+
ie({
|
|
494
|
+
datasetObject: e,
|
|
495
|
+
requiredAttributes: ["name", "values"]
|
|
496
|
+
}).forEach((e) => {
|
|
497
|
+
oe({
|
|
498
|
+
componentName: "VueUiDonut",
|
|
499
|
+
type: "datasetSerieAttribute",
|
|
500
|
+
property: e,
|
|
501
|
+
index: t,
|
|
502
|
+
debug: tr.value
|
|
503
|
+
}), An.value = !1, fr.value = !0;
|
|
504
|
+
});
|
|
505
|
+
}), tr.value && j.dataset.forEach((e, t) => {
|
|
506
|
+
(!e.name || e.name === "") && oe({
|
|
507
|
+
componentName: "VueUiDonut",
|
|
508
|
+
type: "datasetAttributeEmpty",
|
|
509
|
+
property: "name",
|
|
510
|
+
index: t
|
|
511
|
+
});
|
|
512
|
+
})), c(j.dataset) || (fr.value = I.value.loading), I.value.responsive) {
|
|
513
|
+
let e = Oe(() => {
|
|
514
|
+
let { width: e, height: t } = ke({
|
|
515
|
+
chart: M.value,
|
|
516
|
+
title: I.value.style.chart.title.text ? Pn.value : null,
|
|
517
|
+
legend: I.value.style.chart.legend.show ? Fn.value : null,
|
|
518
|
+
source: Rn.value,
|
|
519
|
+
noTitle: zn.value,
|
|
520
|
+
padding: I.value.autoSize ? void 0 : Cr.value
|
|
521
|
+
});
|
|
522
|
+
requestAnimationFrame(() => {
|
|
523
|
+
U.value.width = e, U.value.height = t, $n();
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
In.value && (Ln.value && In.value.unobserve(Ln.value), In.value.disconnect()), In.value = new ResizeObserver(e), Ln.value = M.value.parentNode, In.value.observe(Ln.value);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
let P = T(le()), rr = T(!1), ir = T(""), F = T(null), ar = T(0);
|
|
530
|
+
function or() {
|
|
531
|
+
let e = xe({
|
|
532
|
+
userConfig: j.config,
|
|
533
|
+
defaultConfig: En
|
|
534
|
+
}), t = {}, n = e.theme;
|
|
535
|
+
if (!n) t = e;
|
|
536
|
+
else if (!Dn.value(e)) On(e), t = e;
|
|
537
|
+
else {
|
|
538
|
+
let r = xe({
|
|
539
|
+
userConfig: Le[n] || j.config,
|
|
540
|
+
defaultConfig: e
|
|
541
|
+
});
|
|
542
|
+
t = {
|
|
543
|
+
...xe({
|
|
544
|
+
userConfig: j.config,
|
|
545
|
+
defaultConfig: r
|
|
546
|
+
}),
|
|
547
|
+
customPalette: e.customPalette.length ? e.customPalette : te[n] || o
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
return t;
|
|
551
|
+
}
|
|
552
|
+
let I = T(or()), L = g(() => I.value.style.chart.layout.labels), R = g(() => I.value.style.chart.layout.donut), sr = g(() => I.value.style.chart.layout), z = g(() => I.value.style.chart);
|
|
553
|
+
he({
|
|
554
|
+
config: () => I.value,
|
|
555
|
+
dataset: () => j.dataset,
|
|
556
|
+
component: "VueUiDonut",
|
|
557
|
+
rules: [
|
|
558
|
+
ge.singleSeries,
|
|
559
|
+
ge.emptyArray,
|
|
560
|
+
{
|
|
561
|
+
test: (e) => e.length > 6,
|
|
562
|
+
message: [
|
|
563
|
+
"👀 The number of series is > 6. Consider:",
|
|
564
|
+
"",
|
|
565
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
566
|
+
"",
|
|
567
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
568
|
+
"",
|
|
569
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
});
|
|
574
|
+
let cr = g(() => I.value.userOptions.useCursorPointer), lr = g(() => f({
|
|
575
|
+
defaultConfig: {
|
|
576
|
+
useCssAnimation: !1,
|
|
577
|
+
table: { show: !1 },
|
|
578
|
+
startAnimation: { show: !1 },
|
|
579
|
+
userOptions: { show: !1 },
|
|
580
|
+
style: { chart: {
|
|
581
|
+
backgroundColor: "#99999930",
|
|
582
|
+
layout: { labels: {
|
|
583
|
+
dataLabels: { show: !1 },
|
|
584
|
+
hollow: {
|
|
585
|
+
average: { show: !1 },
|
|
586
|
+
total: { show: !1 }
|
|
587
|
+
},
|
|
588
|
+
value: { show: !1 }
|
|
589
|
+
} },
|
|
590
|
+
legend: {
|
|
591
|
+
backgroundColor: "transparent",
|
|
592
|
+
showValue: !1,
|
|
593
|
+
showPercentage: !1
|
|
594
|
+
},
|
|
595
|
+
title: {
|
|
596
|
+
color: "#1A1A1A",
|
|
597
|
+
subtitle: { color: "#5A5A5A" }
|
|
598
|
+
}
|
|
599
|
+
} }
|
|
600
|
+
},
|
|
601
|
+
userConfig: I.value.skeletonConfig ?? {}
|
|
602
|
+
})), { loading: ur, FINAL_DATASET: dr, manualLoading: fr, skeletonDataset: pr } = ye({
|
|
603
|
+
...Ze(j),
|
|
604
|
+
FINAL_CONFIG: I,
|
|
605
|
+
prepareConfig: or,
|
|
606
|
+
skeletonDataset: j.config?.skeletonDataset ?? [
|
|
607
|
+
{
|
|
608
|
+
name: "",
|
|
609
|
+
values: [3],
|
|
610
|
+
color: "#BABABA"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: "",
|
|
614
|
+
values: [2],
|
|
615
|
+
color: "#AAAAAA"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: "",
|
|
619
|
+
values: [1],
|
|
620
|
+
color: "#CACACA"
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
skeletonConfig: f({
|
|
624
|
+
defaultConfig: I.value,
|
|
625
|
+
userConfig: lr.value
|
|
626
|
+
})
|
|
627
|
+
}), B = T(!0), mr = T(0), hr = T(!1), gr = null;
|
|
628
|
+
function _r(e = 1e3) {
|
|
629
|
+
return new Promise((t) => {
|
|
630
|
+
let n = performance.now();
|
|
631
|
+
function r(i) {
|
|
632
|
+
let a = i - n, o = Math.min(a / e, 1), s = pe(o);
|
|
633
|
+
mr.value = s, o < 1 ? gr = requestAnimationFrame(r) : (mr.value = 1, gr = null, t());
|
|
634
|
+
}
|
|
635
|
+
gr !== null && cancelAnimationFrame(gr), mr.value = 0, gr = requestAnimationFrame(r);
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
et(() => ur.value, async (e) => {
|
|
639
|
+
if (e || hr.value) return;
|
|
640
|
+
let t = dr.value === pr, n = I.value.startAnimation?.show;
|
|
641
|
+
!t && n ? (hr.value = !0, await _r(I.value.startAnimation.durationMs || 1e3)) : mr.value = 1, B.value = !1;
|
|
642
|
+
}, { immediate: !0 });
|
|
643
|
+
let { userOptionsVisible: vr, setUserOptionsVisibility: yr, keepUserOptionState: br } = Ne({ config: I.value }), { svgRef: V } = Pe({ config: z.value.title });
|
|
644
|
+
function xr() {
|
|
645
|
+
yr(!0);
|
|
646
|
+
}
|
|
647
|
+
function Sr() {
|
|
648
|
+
yr(!1);
|
|
649
|
+
}
|
|
650
|
+
et(() => j.config, (e) => {
|
|
651
|
+
ur.value || (I.value = or()), vr.value = !I.value.userOptions.showOnChartHover, nr(), Bn.value += 1, Vn.value += 1, Hn.value += 1, H.value.dataLabels.show = L.value.dataLabels.show, H.value.showTable = I.value.table.show, H.value.showTooltip = z.value.tooltip.show, U.value.height = z.value.height, U.value.width = z.value.width;
|
|
652
|
+
}, { deep: !0 });
|
|
653
|
+
let Cr = g(() => {
|
|
654
|
+
let { top: e, right: t, bottom: n, left: r } = z.value.padding;
|
|
655
|
+
return {
|
|
656
|
+
css: `padding:${e}px ${t}px ${n}px ${r}px`,
|
|
657
|
+
top: e,
|
|
658
|
+
right: t,
|
|
659
|
+
bottom: n,
|
|
660
|
+
left: r
|
|
661
|
+
};
|
|
662
|
+
}), { isPrinting: wr, isImaging: Tr, generatePdf: Er, generateImage: Dr } = ve({
|
|
663
|
+
elementId: `donut__${P.value}`,
|
|
664
|
+
fileName: z.value.title.text || "vue-ui-donut",
|
|
665
|
+
options: I.value.userOptions.print
|
|
666
|
+
}), Or = g(() => I.value.userOptions.show && !z.value.title.text), kr = g(() => me(I.value.customPalette)), H = T({
|
|
667
|
+
dataLabels: { show: L.value.dataLabels.show },
|
|
668
|
+
showTable: I.value.table.show,
|
|
669
|
+
showTooltip: z.value.tooltip.show
|
|
670
|
+
});
|
|
671
|
+
et(I, () => {
|
|
672
|
+
H.value = {
|
|
673
|
+
dataLabels: { show: L.value.dataLabels.show },
|
|
674
|
+
showTable: I.value.table.show,
|
|
675
|
+
showTooltip: z.value.tooltip.show
|
|
676
|
+
};
|
|
677
|
+
}, { immediate: !0 });
|
|
678
|
+
let U = T({
|
|
679
|
+
height: z.value.height,
|
|
680
|
+
width: z.value.width
|
|
681
|
+
}), Ar = g(() => {
|
|
682
|
+
if (I.value.pie) return q.value;
|
|
683
|
+
let e = R.value.strokeWidth / 512, t = Math.min(U.value.width, U.value.height) * e, n = t > q.value ? q.value : t;
|
|
684
|
+
return Math.max(n, 12 * (1 + e));
|
|
685
|
+
}), jr = rt, W = g(() => dr.value.sort((e, t) => {
|
|
686
|
+
let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
|
|
687
|
+
return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
|
|
688
|
+
}).map((e, t) => ({
|
|
689
|
+
name: e.name,
|
|
690
|
+
color: l(e.color) || kr.value[t] || o[t] || o[t % o.length],
|
|
691
|
+
value: ne(e.values.reduce((e, t) => e + t, 0)),
|
|
692
|
+
absoluteValues: e.values,
|
|
693
|
+
comment: e.comment || "",
|
|
694
|
+
patternIndex: t,
|
|
695
|
+
seriesIndex: t,
|
|
696
|
+
ghost: !1,
|
|
697
|
+
pattern: `pattern_${P.value}_${t}`
|
|
698
|
+
})));
|
|
699
|
+
et(() => j.dataset, (e) => {
|
|
700
|
+
Array.isArray(e) && e.length > 0 && (fr.value = !1);
|
|
701
|
+
}, { immediate: !0 });
|
|
702
|
+
let G = Xe(W.value);
|
|
703
|
+
et(() => W.value, (e) => {
|
|
704
|
+
G.value = e, requestAnimationFrame($n);
|
|
705
|
+
});
|
|
706
|
+
function Mr() {
|
|
707
|
+
return W.value.map((e) => ({
|
|
708
|
+
name: e.name,
|
|
709
|
+
color: e.color,
|
|
710
|
+
value: e.value
|
|
711
|
+
}));
|
|
712
|
+
}
|
|
713
|
+
let K = T([]), Nr = T(!1), Pr = T(null);
|
|
714
|
+
function Fr() {
|
|
715
|
+
jr("selectLegend", Ur.value.map((e) => ({
|
|
716
|
+
name: e.name,
|
|
717
|
+
color: e.color,
|
|
718
|
+
value: e.value
|
|
719
|
+
})));
|
|
720
|
+
}
|
|
721
|
+
function Ir({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = pe }) {
|
|
722
|
+
let o = performance.now();
|
|
723
|
+
function s(c) {
|
|
724
|
+
let l = Math.min((c - o) / n, 1), u = a(l);
|
|
725
|
+
r(e + (t - e) * u, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
|
|
726
|
+
}
|
|
727
|
+
requestAnimationFrame(s);
|
|
728
|
+
}
|
|
729
|
+
function Lr() {
|
|
730
|
+
K.value.length ? K.value = [] : Wr.value.forEach((e, t) => {
|
|
731
|
+
K.value.push(t);
|
|
732
|
+
}), Fr();
|
|
733
|
+
}
|
|
734
|
+
function Rr(e) {
|
|
735
|
+
let t = W.value.find((t, n) => n === e), n = G.value.find((t, n) => n === e).value;
|
|
736
|
+
if (K.value.includes(e)) {
|
|
737
|
+
K.value = K.value.filter((t) => t !== e);
|
|
738
|
+
let r = t.value;
|
|
739
|
+
function i() {
|
|
740
|
+
G.value = G.value.map((t, n) => e === n ? {
|
|
741
|
+
...t,
|
|
742
|
+
value: r
|
|
743
|
+
} : t), Fr();
|
|
744
|
+
}
|
|
745
|
+
function a() {
|
|
746
|
+
Nr.value = !0, Pr.value = e, Ir({
|
|
747
|
+
from: n,
|
|
748
|
+
to: r,
|
|
749
|
+
duration: I.value.serieToggleAnimation.durationMs,
|
|
750
|
+
onUpdate: (t, n) => {
|
|
751
|
+
G.value = G.value.map((n, r) => e === r ? {
|
|
752
|
+
...n,
|
|
753
|
+
value: t
|
|
754
|
+
} : n), requestAnimationFrame($n);
|
|
755
|
+
},
|
|
756
|
+
onDone: () => {
|
|
757
|
+
i(), Nr.value = !1, Pr.value = null;
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
I.value.serieToggleAnimation.show && I.value.type === "classic" ? a() : (i(), requestAnimationFrame($n));
|
|
762
|
+
} else if (K.value.length < W.value.length - 1) {
|
|
763
|
+
function t() {
|
|
764
|
+
K.value.push(e), G.value = G.value.map((t, n) => e === n ? {
|
|
765
|
+
...t,
|
|
766
|
+
value: 0
|
|
767
|
+
} : t), Fr();
|
|
768
|
+
}
|
|
769
|
+
function r() {
|
|
770
|
+
Nr.value = !0, Pr.value = e, Ir({
|
|
771
|
+
from: n,
|
|
772
|
+
to: 0,
|
|
773
|
+
duration: I.value.serieToggleAnimation.durationMs,
|
|
774
|
+
onUpdate: (t, n) => {
|
|
775
|
+
G.value = G.value.map((n, r) => e === r ? {
|
|
776
|
+
...n,
|
|
777
|
+
value: t
|
|
778
|
+
} : n), requestAnimationFrame($n);
|
|
779
|
+
},
|
|
780
|
+
onDone: () => {
|
|
781
|
+
t(), requestAnimationFrame($n), Nr.value = !1, Pr.value = null;
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
I.value.serieToggleAnimation.show && I.value.type === "classic" ? r() : t();
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function zr(e) {
|
|
789
|
+
return W.value.length ? W.value.find((t) => t.name === e) || (tr.value && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (tr.value && console.warn("VueUiDonut - There are no series to show."), null);
|
|
790
|
+
}
|
|
791
|
+
function Br(e) {
|
|
792
|
+
let t = zr(e);
|
|
793
|
+
t !== null && K.value.includes(t.seriesIndex) && Rr(t.seriesIndex);
|
|
794
|
+
}
|
|
795
|
+
function Vr(e) {
|
|
796
|
+
let t = zr(e);
|
|
797
|
+
t !== null && (K.value.includes(t.seriesIndex) || Rr(t.seriesIndex));
|
|
798
|
+
}
|
|
799
|
+
let Hr = g(() => dr.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), Ur = g(() => {
|
|
800
|
+
if (B.value && !ur.value) {
|
|
801
|
+
let e = mr.value, t = W.value.map((t) => ({
|
|
802
|
+
...t,
|
|
803
|
+
value: t.value * e,
|
|
804
|
+
color: t.color,
|
|
805
|
+
ghost: !1
|
|
806
|
+
})), n = Hr.value * (1 - e);
|
|
807
|
+
return n > 0 && t.push({
|
|
808
|
+
name: "__ghost__",
|
|
809
|
+
value: n,
|
|
810
|
+
color: "transparent",
|
|
811
|
+
ghost: !0
|
|
812
|
+
}), t;
|
|
813
|
+
}
|
|
814
|
+
return G.value.forEach((e) => {
|
|
815
|
+
if ([null, void 0].includes(e.values)) return {
|
|
816
|
+
...e,
|
|
817
|
+
values: []
|
|
818
|
+
};
|
|
819
|
+
}), G.value.map((e, t) => ({
|
|
820
|
+
...e,
|
|
821
|
+
seriesIndex: t
|
|
822
|
+
})).filter((e, t) => !K.value.includes(t));
|
|
823
|
+
}), Wr = g(() => dr.value.map((e, t) => {
|
|
824
|
+
let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / dr.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
|
|
825
|
+
return {
|
|
826
|
+
name: e.name,
|
|
827
|
+
color: l(e.color) || kr.value[t] || o[t] || o[t % o.length],
|
|
828
|
+
value: n,
|
|
829
|
+
shape: "circle",
|
|
830
|
+
patternIndex: t,
|
|
831
|
+
proportion: r
|
|
832
|
+
};
|
|
833
|
+
}).map((e, t) => {
|
|
834
|
+
let n = m(L.value.value.formatter, e.value, d({
|
|
835
|
+
p: L.value.dataLabels.prefix,
|
|
836
|
+
v: e.value,
|
|
837
|
+
s: L.value.dataLabels.suffix,
|
|
838
|
+
r: z.value.legend.roundingValue
|
|
839
|
+
}), {
|
|
840
|
+
datapoint: e,
|
|
841
|
+
index: t
|
|
842
|
+
}), r = m(L.value.percentage.formatter, ti(e), d({
|
|
843
|
+
v: ti(e),
|
|
844
|
+
s: "%",
|
|
845
|
+
r: z.value.legend.roundingPercentage
|
|
846
|
+
})), i = vi({
|
|
847
|
+
val: n,
|
|
848
|
+
percentage: K.value.includes(t) ? `${_i(e.proportion * 100)}%` : r,
|
|
849
|
+
showVal: z.value.legend.showValue,
|
|
850
|
+
showPercentage: z.value.legend.showPercentage,
|
|
851
|
+
config: z.value.legend
|
|
852
|
+
});
|
|
853
|
+
return {
|
|
854
|
+
...e,
|
|
855
|
+
opacity: K.value.includes(t) ? .5 : 1,
|
|
856
|
+
segregate: () => !Nr.value && Rr(t),
|
|
857
|
+
isSegregated: K.value.includes(t),
|
|
858
|
+
display: `${e.name}${z.value.legend.showPercentage || z.value.legend.showValue ? ": " : ""}${i}`
|
|
859
|
+
};
|
|
860
|
+
})), Gr = g(() => ({
|
|
861
|
+
cy: "donut-div-legend",
|
|
862
|
+
backgroundColor: z.value.legend.backgroundColor,
|
|
863
|
+
color: z.value.legend.color,
|
|
864
|
+
fontSize: z.value.legend.fontSize,
|
|
865
|
+
paddingBottom: 12,
|
|
866
|
+
fontWeight: z.value.legend.bold ? "bold" : ""
|
|
867
|
+
})), q = g(() => {
|
|
868
|
+
let e = R.value.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(U.value.width * t, U.value.height * t);
|
|
869
|
+
return Math.max(12, n);
|
|
870
|
+
}), J = g(() => s({ series: Ur.value }, U.value.width / 2, U.value.height / 2, q.value, q.value, 1.99999, 2, 1, 360, 105.25, Ar.value)), Kr = g(() => Math.abs(Ur.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), qr = g(() => s({ series: [{
|
|
871
|
+
value: 1,
|
|
872
|
+
color: R.value.emptyFill,
|
|
873
|
+
name: "_",
|
|
874
|
+
seriesIndex: 0,
|
|
875
|
+
patternIndex: -1,
|
|
876
|
+
ghost: !1,
|
|
877
|
+
absoluteValues: [1]
|
|
878
|
+
}] }, U.value.width / 2, U.value.height / 2, q.value, q.value, 1.99999, 2, 1, 360, 105.25, Ar.value)), Y = g(() => J.value.filter((e) => !e.ghost)), X = g(() => {
|
|
879
|
+
let e = Math.max(...Ur.value.map((e) => e.value)), t = Ur.value.map((t) => t.value / e);
|
|
880
|
+
return ae({
|
|
881
|
+
series: t,
|
|
882
|
+
center: {
|
|
883
|
+
x: U.value.width / 2,
|
|
884
|
+
y: U.value.height / 2
|
|
885
|
+
},
|
|
886
|
+
maxRadius: Math.min(U.value.width, U.value.height) / 3,
|
|
887
|
+
hasGhost: B.value
|
|
888
|
+
});
|
|
889
|
+
});
|
|
890
|
+
function Jr(e) {
|
|
891
|
+
return e.x > U.value.width / 2 + 6 ? "start" : e.x < U.value.width / 2 - 6 ? "end" : "middle";
|
|
892
|
+
}
|
|
893
|
+
function Yr(e) {
|
|
894
|
+
return e.middlePoint.y > U.value.height / 2 ? i({
|
|
895
|
+
initX: e.middlePoint.x,
|
|
896
|
+
initY: e.middlePoint.y,
|
|
897
|
+
offset: 100,
|
|
898
|
+
centerX: U.value.width / 2,
|
|
899
|
+
centerY: U.value.height / 2
|
|
900
|
+
}).y : i({
|
|
901
|
+
initX: e.middlePoint.x,
|
|
902
|
+
initY: e.middlePoint.y,
|
|
903
|
+
offset: 0,
|
|
904
|
+
centerX: U.value.width / 2,
|
|
905
|
+
centerY: U.value.height / 2
|
|
906
|
+
}).y - 100;
|
|
907
|
+
}
|
|
908
|
+
function Z(e) {
|
|
909
|
+
return e.proportion * 100 > L.value.dataLabels.hideUnderValue;
|
|
910
|
+
}
|
|
911
|
+
function Xr(e, t) {
|
|
912
|
+
let n = L.value.dataLabels.hideUnderValue, r = L.value.dataLabels.smallArcClusterThreshold, i = ($r.value[t] ?? e.proportion ?? 0) * 100;
|
|
913
|
+
return i > n && i <= r;
|
|
914
|
+
}
|
|
915
|
+
let { smallArcLayoutsClassic: Q } = nt({
|
|
916
|
+
FINAL_CONFIG: I,
|
|
917
|
+
noGhostDonut: Y,
|
|
918
|
+
svg: U,
|
|
919
|
+
padding: Cr,
|
|
920
|
+
labels_inline_fontSize: Zn,
|
|
921
|
+
minSize: q,
|
|
922
|
+
findArcMidpoint: se,
|
|
923
|
+
calcMarkerOffsetX: p,
|
|
924
|
+
calcMarkerOffsetY: ce,
|
|
925
|
+
animatingIndex: Pr,
|
|
926
|
+
segregated: K,
|
|
927
|
+
isSmallArc: Xr
|
|
928
|
+
});
|
|
929
|
+
function Zr(e, t) {
|
|
930
|
+
let n = e.value / Qr(t);
|
|
931
|
+
return isNaN(n) ? 0 : m(L.value.percentage.formatter, n * 100, d({
|
|
932
|
+
v: n * 100,
|
|
933
|
+
s: "%",
|
|
934
|
+
r: L.value.percentage.rounding
|
|
935
|
+
}), { datapoint: e });
|
|
936
|
+
}
|
|
937
|
+
function Qr(e) {
|
|
938
|
+
return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
|
|
939
|
+
}
|
|
940
|
+
let $ = g(() => Ur.value.map((e) => e.value).reduce((e, t) => e + t, 0)), $r = g(() => {
|
|
941
|
+
let e = W.value.reduce((e, t) => e + t.value, 0);
|
|
942
|
+
return e <= 0 ? [] : W.value.map((t) => t.value / e);
|
|
943
|
+
}), ei = g(() => $.value / Ur.value.length);
|
|
944
|
+
function ti(e) {
|
|
945
|
+
return Nr.value ? e.proportion * 100 : e.value / $.value * 100;
|
|
946
|
+
}
|
|
947
|
+
let ni = T(null), ri = T(!1);
|
|
948
|
+
function ii({ datapoint: e, seriesIndex: t }) {
|
|
949
|
+
I.value.events.datapointLeave && I.value.events.datapointLeave({
|
|
950
|
+
datapoint: e,
|
|
951
|
+
seriesIndex: t
|
|
952
|
+
}), rr.value = !1, F.value = null, Kn.value = null, Jn.value = "pointer";
|
|
953
|
+
}
|
|
954
|
+
function ai({ datapoint: e, relativeIndex: t, seriesIndex: r, show: i = !1, triggerMode: a = "pointer" }) {
|
|
955
|
+
I.value.events.datapointEnter && I.value.events.datapointEnter({
|
|
956
|
+
datapoint: e,
|
|
957
|
+
seriesIndex: r
|
|
958
|
+
}), Jn.value = a, Kn.value = t, ni.value = {
|
|
959
|
+
datapoint: e,
|
|
960
|
+
seriesIndex: r,
|
|
961
|
+
config: I.value,
|
|
962
|
+
series: W.value
|
|
963
|
+
}, rr.value = i, F.value = t;
|
|
964
|
+
let o = "", s = z.value.tooltip.customFormat;
|
|
965
|
+
if (ri.value = !1, n(s)) try {
|
|
966
|
+
let t = s({
|
|
967
|
+
seriesIndex: r,
|
|
968
|
+
datapoint: e,
|
|
969
|
+
series: W.value,
|
|
970
|
+
config: I.value
|
|
971
|
+
});
|
|
972
|
+
typeof t == "string" && (ir.value = t, ri.value = !0);
|
|
973
|
+
} catch {
|
|
974
|
+
console.warn("Custom format cannot be applied."), ri.value = !1;
|
|
975
|
+
}
|
|
976
|
+
ri.value || (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${z.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${e.color}"/>${kn.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${P.value}_${r})"/>` : ""}</svg>`, o += `<b>${vi({
|
|
977
|
+
showVal: z.value.tooltip.showValue,
|
|
978
|
+
showPercentage: z.value.tooltip.showPercentage,
|
|
979
|
+
val: `<span>${m(L.value.value.formatter, e.value, d({
|
|
980
|
+
p: L.value.dataLabels.prefix,
|
|
981
|
+
v: e.value,
|
|
982
|
+
s: L.value.dataLabels.suffix,
|
|
983
|
+
r: z.value.tooltip.roundingValue
|
|
984
|
+
}), {
|
|
985
|
+
datapoint: e,
|
|
986
|
+
relativeIndex: t,
|
|
987
|
+
seriesIndex: r
|
|
988
|
+
})}</span>`,
|
|
989
|
+
percentage: m(L.value.percentage.formatter, e.proportion * 100, d({
|
|
990
|
+
v: e.proportion * 100,
|
|
991
|
+
s: "%",
|
|
992
|
+
r: z.value.tooltip.roundingPercentage
|
|
993
|
+
}), {
|
|
994
|
+
datapoint: e,
|
|
995
|
+
relativeIndex: t,
|
|
996
|
+
seriesIndex: r
|
|
997
|
+
}),
|
|
998
|
+
config: z.value.tooltip
|
|
999
|
+
})}</b></div>`, z.value.comments.showInTooltip && e.comment && (o += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), ir.value = `<div>${o}</div>`);
|
|
1000
|
+
}
|
|
1001
|
+
function oi(e, t) {
|
|
1002
|
+
let n = Q.value[t];
|
|
1003
|
+
if (n) return {
|
|
1004
|
+
textAnchor: n.textAnchor,
|
|
1005
|
+
x: n.labelX,
|
|
1006
|
+
y: n.labelY
|
|
1007
|
+
};
|
|
1008
|
+
let r = p(e, !0, 12);
|
|
1009
|
+
return {
|
|
1010
|
+
textAnchor: r.anchor,
|
|
1011
|
+
x: r.x,
|
|
1012
|
+
y: ce(e)
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
function si(e, t, n) {
|
|
1016
|
+
let { textAnchor: r, x: i } = oi(e, t), a = yi(e), o = `
|
|
1017
|
+
<tspan
|
|
1018
|
+
class="vue-data-ui-datalabel-inline"
|
|
1019
|
+
fill="${L.value.percentage.color}"
|
|
1020
|
+
font-size="${n ? Zn.value : Xn.value}px"
|
|
1021
|
+
style="font-weight:${L.value.percentage.bold ? "bold" : ""}"
|
|
1022
|
+
>${a}</tspan>
|
|
1023
|
+
`, s = String(e.name ?? "").split(/\n/g), c = "";
|
|
1024
|
+
return s.forEach((e, t) => {
|
|
1025
|
+
c += t === 0 ? `
|
|
1026
|
+
<tspan
|
|
1027
|
+
class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
|
|
1028
|
+
fill="${L.value.name.color}"
|
|
1029
|
+
font-size="${n ? Zn.value : N.value}px"
|
|
1030
|
+
style="font-weight:${L.value.name.bold ? "bold" : ""}"
|
|
1031
|
+
>${e}</tspan>
|
|
1032
|
+
` : `
|
|
1033
|
+
<tspan
|
|
1034
|
+
class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
|
|
1035
|
+
x="${i}"
|
|
1036
|
+
dy="${(n ? Zn.value : N.value) * 1.2}"
|
|
1037
|
+
fill="${L.value.name.color}"
|
|
1038
|
+
font-size="${n ? Zn.value : N.value}px"
|
|
1039
|
+
style="font-weight:${L.value.name.bold ? "bold" : ""}"
|
|
1040
|
+
>${e}</tspan>
|
|
1041
|
+
`;
|
|
1042
|
+
}), r === "end" ? `${L.value.name.show ? c : ""}${o}` : `${o}${L.value.name.show ? c : ""}`;
|
|
1043
|
+
}
|
|
1044
|
+
function ci(e, t) {
|
|
1045
|
+
let n = X.value[t].middlePoint, r = Jr(n), a = i({
|
|
1046
|
+
initX: n.x,
|
|
1047
|
+
initY: n.y,
|
|
1048
|
+
offset: 42,
|
|
1049
|
+
centerX: U.value.width / 2,
|
|
1050
|
+
centerY: U.value.height / 2
|
|
1051
|
+
}), o = a.x;
|
|
1052
|
+
a.y;
|
|
1053
|
+
let s = yi(e), c = `
|
|
1054
|
+
<tspan
|
|
1055
|
+
class="vue-data-ui-datalabel-value"
|
|
1056
|
+
fill="${L.value.percentage.color}"
|
|
1057
|
+
font-size="${Xn.value}px"
|
|
1058
|
+
style="font-weight:${L.value.percentage.bold ? "bold" : "normal"}"
|
|
1059
|
+
>${s}</tspan>
|
|
1060
|
+
`, l = String(e.name ?? "").split(/\n/g), u = "";
|
|
1061
|
+
return l.forEach((e, t) => {
|
|
1062
|
+
u += t === 0 ? `
|
|
1063
|
+
<tspan
|
|
1064
|
+
class="vue-data-ui-datalabel-name"
|
|
1065
|
+
fill="${L.value.name.color}"
|
|
1066
|
+
font-size="${N.value}px"
|
|
1067
|
+
style="font-weight:${L.value.name.bold ? "bold" : "normal"}"
|
|
1068
|
+
>${e}</tspan>
|
|
1069
|
+
` : `
|
|
1070
|
+
<tspan
|
|
1071
|
+
class="vue-data-ui-datalabel-name"
|
|
1072
|
+
x="${o}"
|
|
1073
|
+
dy="${N.value * 1.2}"
|
|
1074
|
+
fill="${L.value.name.color}"
|
|
1075
|
+
font-size="${N.value}px"
|
|
1076
|
+
style="font-weight:${L.value.name.bold ? "bold" : "normal"}"
|
|
1077
|
+
>${e}</tspan>
|
|
1078
|
+
`;
|
|
1079
|
+
}), r === "end" ? `${L.value.name.show ? u : ""}${c}` : `${c}${L.value.name.show ? u : ""}`;
|
|
1080
|
+
}
|
|
1081
|
+
function li(e) {
|
|
1082
|
+
return I.value.useBlurOnHover && ![null, void 0].includes(F.value) && F.value !== e ? `url(#blur_${P.value})` : "";
|
|
1083
|
+
}
|
|
1084
|
+
function ui(e) {
|
|
1085
|
+
if (!Nr.value || Pr.value === null || e.seriesIndex !== Pr.value) return 1;
|
|
1086
|
+
let t = (e.proportion ?? 0) * 100, n = L.value.dataLabels.hideUnderValue, r = L.value.dataLabels.smallArcClusterThreshold + 2, i = n;
|
|
1087
|
+
return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
|
|
1088
|
+
}
|
|
1089
|
+
let di = g(() => ({
|
|
1090
|
+
head: Ur.value.map((e) => ({
|
|
1091
|
+
name: e.name,
|
|
1092
|
+
color: e.color
|
|
1093
|
+
})),
|
|
1094
|
+
body: Ur.value.map((e) => e.value)
|
|
1095
|
+
}));
|
|
1096
|
+
function fi(e = null) {
|
|
1097
|
+
Ge(() => {
|
|
1098
|
+
let n = di.value.head.map((e, t) => [
|
|
1099
|
+
[e.name],
|
|
1100
|
+
[di.value.body[t]],
|
|
1101
|
+
[isNaN(di.value.body[t] / $.value) ? "-" : di.value.body[t] / $.value * 100]
|
|
1102
|
+
]), i = [
|
|
1103
|
+
[z.value.title.text],
|
|
1104
|
+
[z.value.title.subtitle.text],
|
|
1105
|
+
[
|
|
1106
|
+
[""],
|
|
1107
|
+
["val"],
|
|
1108
|
+
["%"]
|
|
1109
|
+
]
|
|
1110
|
+
].concat(n), a = r(i);
|
|
1111
|
+
e ? e(a) : t({
|
|
1112
|
+
csvContent: a,
|
|
1113
|
+
title: z.value.title.text || "vue-ui-donut"
|
|
1114
|
+
});
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
let pi = g(() => {
|
|
1118
|
+
let e = [
|
|
1119
|
+
"__SUM__",
|
|
1120
|
+
d({
|
|
1121
|
+
p: L.value.dataLabels.prefix,
|
|
1122
|
+
v: $.value,
|
|
1123
|
+
s: L.value.dataLabels.suffix,
|
|
1124
|
+
r: I.value.table.td.roundingValue
|
|
1125
|
+
}),
|
|
1126
|
+
"100%"
|
|
1127
|
+
], t = di.value.head.map((e, t) => [
|
|
1128
|
+
{
|
|
1129
|
+
color: e.color,
|
|
1130
|
+
name: e.name || "-"
|
|
1131
|
+
},
|
|
1132
|
+
di.value.body[t],
|
|
1133
|
+
isNaN(di.value.body[t] / $.value) ? "-" : (di.value.body[t] / $.value * 100).toFixed(I.value.table.td.roundingPercentage) + "%"
|
|
1134
|
+
]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
|
|
1135
|
+
th: {
|
|
1136
|
+
backgroundColor: I.value.table.th.backgroundColor,
|
|
1137
|
+
color: I.value.table.th.color,
|
|
1138
|
+
outline: I.value.table.th.outline
|
|
1139
|
+
},
|
|
1140
|
+
td: {
|
|
1141
|
+
backgroundColor: I.value.table.td.backgroundColor,
|
|
1142
|
+
color: I.value.table.td.color,
|
|
1143
|
+
outline: I.value.table.td.outline
|
|
1144
|
+
},
|
|
1145
|
+
breakpoint: I.value.table.responsiveBreakpoint
|
|
1146
|
+
};
|
|
1147
|
+
return {
|
|
1148
|
+
colNames: [
|
|
1149
|
+
I.value.table.columnNames.series,
|
|
1150
|
+
I.value.table.columnNames.value,
|
|
1151
|
+
I.value.table.columnNames.percentage
|
|
1152
|
+
],
|
|
1153
|
+
head: e,
|
|
1154
|
+
body: t,
|
|
1155
|
+
a11yBody: n,
|
|
1156
|
+
config: r
|
|
1157
|
+
};
|
|
1158
|
+
}), mi = T(!1);
|
|
1159
|
+
function hi(e) {
|
|
1160
|
+
mi.value = e, ar.value += 1;
|
|
1161
|
+
}
|
|
1162
|
+
let gi = g(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
1163
|
+
function _i(e) {
|
|
1164
|
+
return Fe({
|
|
1165
|
+
num: e,
|
|
1166
|
+
rounding: z.value.legend.roundingPercentage
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
function vi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
1170
|
+
return Ie({
|
|
1171
|
+
config: i,
|
|
1172
|
+
val: e,
|
|
1173
|
+
percentage: t,
|
|
1174
|
+
showVal: n,
|
|
1175
|
+
showPercentage: r
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
function yi(e) {
|
|
1179
|
+
return vi({
|
|
1180
|
+
val: m(L.value.value.formatter, e.value, d({
|
|
1181
|
+
p: L.value.dataLabels.prefix,
|
|
1182
|
+
v: e.value,
|
|
1183
|
+
s: L.value.dataLabels.suffix,
|
|
1184
|
+
r: L.value.value.rounding
|
|
1185
|
+
}), { datapoint: e }),
|
|
1186
|
+
percentage: Zr(e, Y.value),
|
|
1187
|
+
showVal: L.value.value.show,
|
|
1188
|
+
showPercentage: L.value.percentage.show,
|
|
1189
|
+
config: L.value.dataLabels
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
function bi(e, t) {
|
|
1193
|
+
I.value.events.datapointClick && I.value.events.datapointClick({
|
|
1194
|
+
datapoint: e,
|
|
1195
|
+
seriesIndex: e.seriesIndex
|
|
1196
|
+
}), jr("selectDatapoint", {
|
|
1197
|
+
datapoint: e,
|
|
1198
|
+
index: t
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
function xi() {
|
|
1202
|
+
H.value.showTable = !H.value.showTable;
|
|
1203
|
+
}
|
|
1204
|
+
function Si() {
|
|
1205
|
+
H.value.dataLabels.show = !H.value.dataLabels.show;
|
|
1206
|
+
}
|
|
1207
|
+
function Ci() {
|
|
1208
|
+
H.value.showTooltip = !H.value.showTooltip;
|
|
1209
|
+
}
|
|
1210
|
+
let wi = T(!1);
|
|
1211
|
+
function Ti() {
|
|
1212
|
+
wi.value = !wi.value;
|
|
1213
|
+
}
|
|
1214
|
+
async function Ei({ scale: e = 2 } = {}) {
|
|
1215
|
+
if (!M.value) return;
|
|
1216
|
+
let { width: t, height: n } = M.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await we({
|
|
1217
|
+
domElement: M.value,
|
|
1218
|
+
base64: !0,
|
|
1219
|
+
img: !0,
|
|
1220
|
+
scale: e
|
|
1221
|
+
});
|
|
1222
|
+
return {
|
|
1223
|
+
imageUri: i,
|
|
1224
|
+
base64: a,
|
|
1225
|
+
title: z.value.title.text,
|
|
1226
|
+
width: t,
|
|
1227
|
+
height: n,
|
|
1228
|
+
aspectRatio: r
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
function Di() {
|
|
1232
|
+
if (!jn.value) return;
|
|
1233
|
+
let { x: e, y: t, width: n, height: r } = jn.value.getBBox();
|
|
1234
|
+
V.value && V.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
|
|
1235
|
+
}
|
|
1236
|
+
let Oi = g(() => {
|
|
1237
|
+
let e = I.value.table.useDialog && !I.value.table.show, t = H.value.showTable;
|
|
1238
|
+
return {
|
|
1239
|
+
component: e ? Tn : bn,
|
|
1240
|
+
title: `${z.value.title.text}${z.value.title.subtitle.text ? `: ${z.value.title.subtitle.text}` : ""}`,
|
|
1241
|
+
props: e ? {
|
|
1242
|
+
backgroundColor: I.value.table.th.backgroundColor,
|
|
1243
|
+
color: I.value.table.th.color,
|
|
1244
|
+
headerColor: I.value.table.th.color,
|
|
1245
|
+
headerBg: I.value.table.th.backgroundColor,
|
|
1246
|
+
isFullscreen: mi.value,
|
|
1247
|
+
fullscreenParent: M.value,
|
|
1248
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
1249
|
+
isCursorPointer: cr.value
|
|
1250
|
+
} : {
|
|
1251
|
+
hideDetails: !0,
|
|
1252
|
+
config: {
|
|
1253
|
+
open: t,
|
|
1254
|
+
maxHeight: 1e4,
|
|
1255
|
+
body: {
|
|
1256
|
+
backgroundColor: z.value.backgroundColor,
|
|
1257
|
+
color: z.value.color
|
|
1258
|
+
},
|
|
1259
|
+
head: {
|
|
1260
|
+
backgroundColor: z.value.backgroundColor,
|
|
1261
|
+
color: z.value.color
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
});
|
|
1267
|
+
et(() => H.value.showTable, (e) => {
|
|
1268
|
+
I.value.table.show || (e && I.value.table.useDialog && Wn.value ? Wn.value.open() : "close" in Wn.value && Wn.value.close());
|
|
1269
|
+
});
|
|
1270
|
+
function ki() {
|
|
1271
|
+
H.value.showTable = !1, Gn.value && Gn.value.setTableIconState(!1);
|
|
1272
|
+
}
|
|
1273
|
+
let Ai = g(() => Wr.value.map((e) => ({
|
|
1274
|
+
...e,
|
|
1275
|
+
name: e.display
|
|
1276
|
+
}))), ji = g(() => z.value.backgroundColor), Mi = g(() => z.value.legend), Ni = g(() => z.value.title), { isCallbackImaging: Pi, isCallbackSvg: Fi, generateSvg: Ii, onGenerateImage: Li } = Ce({
|
|
1277
|
+
svg: V,
|
|
1278
|
+
title: Ni,
|
|
1279
|
+
legend: Mi,
|
|
1280
|
+
legendItems: Ai,
|
|
1281
|
+
backgroundColor: ji,
|
|
1282
|
+
getSvgCallback: () => I.value.userOptions.callbacks.svg,
|
|
1283
|
+
generateImage: Dr
|
|
1284
|
+
});
|
|
1285
|
+
async function Ri() {
|
|
1286
|
+
if (jr("copyAlt", {
|
|
1287
|
+
config: I.value,
|
|
1288
|
+
dataset: G.value
|
|
1289
|
+
}), !I.value.userOptions.callbacks.altCopy) {
|
|
1290
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
await Promise.resolve(I.value.userOptions.callbacks.altCopy({
|
|
1294
|
+
config: I.value,
|
|
1295
|
+
dataset: G.value
|
|
1296
|
+
}));
|
|
1297
|
+
}
|
|
1298
|
+
function zi() {
|
|
1299
|
+
Kn.value = null, Yn.value = !0;
|
|
1300
|
+
}
|
|
1301
|
+
function Bi() {
|
|
1302
|
+
Kn.value = null, Jn.value = "pointer", rr.value = !1, F.value = null, Yn.value = !1;
|
|
1303
|
+
}
|
|
1304
|
+
function Vi(e) {
|
|
1305
|
+
if (!V.value || wi.value || document.activeElement !== V.value || !Y.value.length) return;
|
|
1306
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1307
|
+
if (!t && !n && !r && !i) return;
|
|
1308
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1309
|
+
Kn.value = null, Jn.value = "pointer", rr.value = !1, F.value = null;
|
|
1310
|
+
return;
|
|
1311
|
+
}
|
|
1312
|
+
if (r) {
|
|
1313
|
+
if (Kn.value === null) return;
|
|
1314
|
+
let e = Y.value[Kn.value];
|
|
1315
|
+
if (!e) return;
|
|
1316
|
+
bi(e, Kn.value);
|
|
1317
|
+
return;
|
|
1318
|
+
}
|
|
1319
|
+
let a = Kn.value, o = F.value, s = a !== null && a >= 0 && a < Y.value.length, c = o !== null && o >= 0 && o < Y.value.length;
|
|
1320
|
+
s ? n ? (a += 1, a >= Y.value.length && (a = 0)) : t && (--a, a < 0 && (a = Y.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Y.value.length && (a = 0), a < 0 && (a = Y.value.length - 1)) : a = n ? 0 : Y.value.length - 1;
|
|
1321
|
+
let l = Y.value[a];
|
|
1322
|
+
l && (Kn.value = a, Hi(a), ai({
|
|
1323
|
+
datapoint: l,
|
|
1324
|
+
relativeIndex: a,
|
|
1325
|
+
seriesIndex: l.seriesIndex,
|
|
1326
|
+
show: !0,
|
|
1327
|
+
triggerMode: "keyboard"
|
|
1328
|
+
}));
|
|
1329
|
+
}
|
|
1330
|
+
function Hi(e) {
|
|
1331
|
+
if (!Number.isFinite(e) || !V.value) return;
|
|
1332
|
+
let t = U.value.width / 2, n = U.value.height / 2;
|
|
1333
|
+
if (I.value.type === "classic") {
|
|
1334
|
+
let r = Y.value[e];
|
|
1335
|
+
if (!r?.arcSlice) return;
|
|
1336
|
+
let i = se(r.arcSlice);
|
|
1337
|
+
if (!i) return;
|
|
1338
|
+
t = i.x, n = i.y;
|
|
1339
|
+
} else {
|
|
1340
|
+
let r = X.value[e]?.middlePoint;
|
|
1341
|
+
if (!r) return;
|
|
1342
|
+
t = r.x, n = r.y;
|
|
1343
|
+
}
|
|
1344
|
+
let r = V.value.getBoundingClientRect();
|
|
1345
|
+
qn.value = {
|
|
1346
|
+
x: r.left + t / U.value.width * r.width,
|
|
1347
|
+
y: r.top + n / U.value.height * r.height
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
let Ui = g(() => ({
|
|
1351
|
+
headers: pi.value?.colNames ?? [],
|
|
1352
|
+
rows: pi.value?.a11yBody ?? []
|
|
1353
|
+
}));
|
|
1354
|
+
return De({
|
|
1355
|
+
autoSize: Di,
|
|
1356
|
+
getData: Mr,
|
|
1357
|
+
getImage: Ei,
|
|
1358
|
+
generatePdf: Er,
|
|
1359
|
+
generateCsv: fi,
|
|
1360
|
+
generateImage: Dr,
|
|
1361
|
+
generateSvg: Ii,
|
|
1362
|
+
hideSeries: Vr,
|
|
1363
|
+
showSeries: Br,
|
|
1364
|
+
toggleTable: xi,
|
|
1365
|
+
toggleLabels: Si,
|
|
1366
|
+
toggleTooltip: Ci,
|
|
1367
|
+
toggleAnnotator: Ti,
|
|
1368
|
+
toggleFullscreen: hi,
|
|
1369
|
+
copyAlt: Ri
|
|
1370
|
+
}), (t, n) => (w(), y("div", {
|
|
1371
|
+
ref_key: "donutChart",
|
|
1372
|
+
ref: M,
|
|
1373
|
+
class: Ke(`vue-data-ui-component vue-ui-donut ${mi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${I.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1374
|
+
style: C(`font-family:${I.value.style.fontFamily};width:100%; ${I.value.responsive ? "height:100%;" : ""} text-align:center;background:${z.value.backgroundColor}`),
|
|
1375
|
+
id: `donut__${P.value}`,
|
|
1376
|
+
onMouseenter: xr,
|
|
1377
|
+
onMouseleave: Sr
|
|
1378
|
+
}, [
|
|
1379
|
+
b("div", {
|
|
1380
|
+
id: `chart-instructions-${P.value}`,
|
|
1381
|
+
class: "sr-only"
|
|
1382
|
+
}, [b("p", null, O(I.value.a11y.translations.keyboardNavigation), 1)], 8, at),
|
|
1383
|
+
Ui.value?.rows?.length ? (w(), _(Me, {
|
|
1384
|
+
key: 0,
|
|
1385
|
+
uid: P.value,
|
|
1386
|
+
head: Ui.value.headers,
|
|
1387
|
+
body: Ui.value.rows,
|
|
1388
|
+
notice: I.value.a11y.translations.tableAvailable,
|
|
1389
|
+
caption: I.value.a11y.translations.tableCaption
|
|
1390
|
+
}, null, 8, [
|
|
1391
|
+
"uid",
|
|
1392
|
+
"head",
|
|
1393
|
+
"body",
|
|
1394
|
+
"notice",
|
|
1395
|
+
"caption"
|
|
1396
|
+
])) : v("", !0),
|
|
1397
|
+
I.value.userOptions.buttons.annotator && k(V) ? (w(), _(k(Sn), {
|
|
1398
|
+
key: 1,
|
|
1399
|
+
color: z.value.color,
|
|
1400
|
+
backgroundColor: z.value.backgroundColor,
|
|
1401
|
+
active: wi.value,
|
|
1402
|
+
svgRef: k(V),
|
|
1403
|
+
isCursorPointer: cr.value,
|
|
1404
|
+
palette: I.value.userOptions.annotatorPalette,
|
|
1405
|
+
onClose: Ti
|
|
1406
|
+
}, {
|
|
1407
|
+
"annotator-action-close": A(() => [D(t.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1408
|
+
"annotator-action-color": A(({ color: e }) => [D(t.$slots, "annotator-action-color", S(x({ color: e })), void 0, !0)]),
|
|
1409
|
+
"annotator-action-draw": A(({ mode: e }) => [D(t.$slots, "annotator-action-draw", S(x({ mode: e })), void 0, !0)]),
|
|
1410
|
+
"annotator-action-undo": A(({ disabled: e }) => [D(t.$slots, "annotator-action-undo", S(x({ disabled: e })), void 0, !0)]),
|
|
1411
|
+
"annotator-action-redo": A(({ disabled: e }) => [D(t.$slots, "annotator-action-redo", S(x({ disabled: e })), void 0, !0)]),
|
|
1412
|
+
"annotator-action-delete": A(({ disabled: e }) => [D(t.$slots, "annotator-action-delete", S(x({ disabled: e })), void 0, !0)]),
|
|
1413
|
+
_: 3
|
|
1414
|
+
}, 8, [
|
|
1415
|
+
"color",
|
|
1416
|
+
"backgroundColor",
|
|
1417
|
+
"active",
|
|
1418
|
+
"svgRef",
|
|
1419
|
+
"isCursorPointer",
|
|
1420
|
+
"palette"
|
|
1421
|
+
])) : v("", !0),
|
|
1422
|
+
D(t.$slots, "userConfig", {}, void 0, !0),
|
|
1423
|
+
Or.value ? (w(), y("div", {
|
|
1424
|
+
key: 2,
|
|
1425
|
+
ref_key: "noTitle",
|
|
1426
|
+
ref: zn,
|
|
1427
|
+
class: "vue-data-ui-no-title-space",
|
|
1428
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1429
|
+
}, null, 512)) : v("", !0),
|
|
1430
|
+
z.value.title.text ? (w(), y("div", {
|
|
1431
|
+
key: 3,
|
|
1432
|
+
ref_key: "chartTitle",
|
|
1433
|
+
ref: Pn,
|
|
1434
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1435
|
+
}, [(w(), _(Te, {
|
|
1436
|
+
key: `title_${Bn.value}`,
|
|
1437
|
+
config: {
|
|
1438
|
+
title: {
|
|
1439
|
+
cy: "donut-div-title",
|
|
1440
|
+
...z.value.title
|
|
1441
|
+
},
|
|
1442
|
+
subtitle: {
|
|
1443
|
+
cy: "donut-div-subtitle",
|
|
1444
|
+
...z.value.title.subtitle
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}, null, 8, ["config"]))], 512)) : v("", !0),
|
|
1448
|
+
b("div", { id: `legend-top-${P.value}` }, null, 8, ot),
|
|
1449
|
+
I.value.userOptions.show && An.value && (k(br) || k(vr)) ? (w(), _(k(Cn), {
|
|
1450
|
+
ref_key: "userOptionsRef",
|
|
1451
|
+
ref: Gn,
|
|
1452
|
+
key: `user_option_${ar.value}`,
|
|
1453
|
+
backgroundColor: z.value.backgroundColor,
|
|
1454
|
+
color: z.value.color,
|
|
1455
|
+
isPrinting: k(wr),
|
|
1456
|
+
isImaging: k(Tr),
|
|
1457
|
+
uid: P.value,
|
|
1458
|
+
hasTooltip: z.value.tooltip.show && I.value.userOptions.buttons.tooltip,
|
|
1459
|
+
hasPdf: I.value.userOptions.buttons.pdf,
|
|
1460
|
+
hasImg: I.value.userOptions.buttons.img,
|
|
1461
|
+
hasSvg: I.value.userOptions.buttons.svg,
|
|
1462
|
+
hasXls: I.value.userOptions.buttons.csv,
|
|
1463
|
+
hasTable: I.value.userOptions.buttons.table,
|
|
1464
|
+
hasLabel: I.value.userOptions.buttons.labels,
|
|
1465
|
+
hasFullscreen: I.value.userOptions.buttons.fullscreen,
|
|
1466
|
+
hasAltCopy: I.value.userOptions.buttons.altCopy,
|
|
1467
|
+
isFullscreen: mi.value,
|
|
1468
|
+
chartElement: M.value,
|
|
1469
|
+
position: I.value.userOptions.position,
|
|
1470
|
+
callbacks: I.value.userOptions.callbacks,
|
|
1471
|
+
isTooltip: H.value.showTooltip,
|
|
1472
|
+
titles: { ...I.value.userOptions.buttonTitles },
|
|
1473
|
+
hasAnnotator: I.value.userOptions.buttons.annotator,
|
|
1474
|
+
isAnnotation: wi.value,
|
|
1475
|
+
printScale: I.value.userOptions.print.scale,
|
|
1476
|
+
tableDialog: I.value.table.useDialog,
|
|
1477
|
+
isCursorPointer: cr.value,
|
|
1478
|
+
onToggleFullscreen: hi,
|
|
1479
|
+
onGeneratePdf: k(Er),
|
|
1480
|
+
onGenerateCsv: fi,
|
|
1481
|
+
onGenerateImage: k(Li),
|
|
1482
|
+
onGenerateSvg: k(Ii),
|
|
1483
|
+
onToggleTable: xi,
|
|
1484
|
+
onToggleLabels: Si,
|
|
1485
|
+
onToggleTooltip: Ci,
|
|
1486
|
+
onToggleAnnotator: Ti,
|
|
1487
|
+
onCopyAlt: Ri,
|
|
1488
|
+
style: C({ visibility: k(br) ? k(vr) ? "visible" : "hidden" : "visible" })
|
|
1489
|
+
}, Be({ _: 2 }, [
|
|
1490
|
+
t.$slots.menuIcon ? {
|
|
1491
|
+
name: "menuIcon",
|
|
1492
|
+
fn: A(({ isOpen: e, color: n }) => [D(t.$slots, "menuIcon", S(x({
|
|
1493
|
+
isOpen: e,
|
|
1494
|
+
color: n
|
|
1495
|
+
})), void 0, !0)]),
|
|
1496
|
+
key: "0"
|
|
1497
|
+
} : void 0,
|
|
1498
|
+
t.$slots.optionTooltip ? {
|
|
1499
|
+
name: "optionTooltip",
|
|
1500
|
+
fn: A(() => [D(t.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1501
|
+
key: "1"
|
|
1502
|
+
} : void 0,
|
|
1503
|
+
t.$slots.optionPdf ? {
|
|
1504
|
+
name: "optionPdf",
|
|
1505
|
+
fn: A(() => [D(t.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1506
|
+
key: "2"
|
|
1507
|
+
} : void 0,
|
|
1508
|
+
t.$slots.optionCsv ? {
|
|
1509
|
+
name: "optionCsv",
|
|
1510
|
+
fn: A(() => [D(t.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1511
|
+
key: "3"
|
|
1512
|
+
} : void 0,
|
|
1513
|
+
t.$slots.optionImg ? {
|
|
1514
|
+
name: "optionImg",
|
|
1515
|
+
fn: A(() => [D(t.$slots, "optionImg", {}, void 0, !0)]),
|
|
1516
|
+
key: "4"
|
|
1517
|
+
} : void 0,
|
|
1518
|
+
t.$slots.optionSvg ? {
|
|
1519
|
+
name: "optionSvg",
|
|
1520
|
+
fn: A(() => [D(t.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1521
|
+
key: "5"
|
|
1522
|
+
} : void 0,
|
|
1523
|
+
t.$slots.optionTable ? {
|
|
1524
|
+
name: "optionTable",
|
|
1525
|
+
fn: A(() => [D(t.$slots, "optionTable", {}, void 0, !0)]),
|
|
1526
|
+
key: "6"
|
|
1527
|
+
} : void 0,
|
|
1528
|
+
t.$slots.optionLabels ? {
|
|
1529
|
+
name: "optionLabels",
|
|
1530
|
+
fn: A(() => [D(t.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1531
|
+
key: "7"
|
|
1532
|
+
} : void 0,
|
|
1533
|
+
t.$slots.optionFullscreen ? {
|
|
1534
|
+
name: "optionFullscreen",
|
|
1535
|
+
fn: A(({ toggleFullscreen: e, isFullscreen: n }) => [D(t.$slots, "optionFullscreen", S(x({
|
|
1536
|
+
toggleFullscreen: e,
|
|
1537
|
+
isFullscreen: n
|
|
1538
|
+
})), void 0, !0)]),
|
|
1539
|
+
key: "8"
|
|
1540
|
+
} : void 0,
|
|
1541
|
+
t.$slots.optionAnnotator ? {
|
|
1542
|
+
name: "optionAnnotator",
|
|
1543
|
+
fn: A(({ toggleAnnotator: e, isAnnotator: n }) => [D(t.$slots, "optionAnnotator", S(x({
|
|
1544
|
+
toggleAnnotator: e,
|
|
1545
|
+
isAnnotator: n
|
|
1546
|
+
})), void 0, !0)]),
|
|
1547
|
+
key: "9"
|
|
1548
|
+
} : void 0,
|
|
1549
|
+
t.$slots.optionAltCopy ? {
|
|
1550
|
+
name: "optionAltCopy",
|
|
1551
|
+
fn: A(({ altCopy: e }) => [D(t.$slots, "optionAltCopy", S(x({ altCopy: e })), void 0, !0)]),
|
|
1552
|
+
key: "10"
|
|
1553
|
+
} : void 0,
|
|
1554
|
+
t.$slots["custom-menu-before"] ? {
|
|
1555
|
+
name: "custom-menu-before",
|
|
1556
|
+
fn: A(() => [D(t.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1557
|
+
key: "11"
|
|
1558
|
+
} : void 0,
|
|
1559
|
+
t.$slots["custom-menu-after"] ? {
|
|
1560
|
+
name: "custom-menu-after",
|
|
1561
|
+
fn: A(() => [D(t.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1562
|
+
key: "12"
|
|
1563
|
+
} : void 0
|
|
1564
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : v("", !0),
|
|
1565
|
+
b("div", st, [(w(), y("svg", {
|
|
1566
|
+
ref_key: "svgRef",
|
|
1567
|
+
ref: V,
|
|
1568
|
+
xmlns: k(fe),
|
|
1569
|
+
"aria-describedby": `chart-instructions-${P.value}`,
|
|
1570
|
+
class: Ke({
|
|
1571
|
+
"vue-data-ui-fullscreen--on": mi.value,
|
|
1572
|
+
"vue-data-ui-fulscreen--off": !mi.value,
|
|
1573
|
+
"vue-data-ui-svg": !0
|
|
1574
|
+
}),
|
|
1575
|
+
viewBox: `0 0 ${U.value.width <= 0 ? 10 : U.value.width} ${U.value.height <= 0 ? 10 : U.value.height}`,
|
|
1576
|
+
style: C(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};${Cr.value.css}`),
|
|
1577
|
+
tabindex: "0",
|
|
1578
|
+
onFocus: zi,
|
|
1579
|
+
onBlur: Bi,
|
|
1580
|
+
onKeydown: Vi
|
|
1581
|
+
}, [b("g", {
|
|
1582
|
+
ref_key: "G",
|
|
1583
|
+
ref: jn,
|
|
1584
|
+
class: "vue-data-ui-g"
|
|
1585
|
+
}, [
|
|
1586
|
+
He(k(wn)),
|
|
1587
|
+
t.$slots["chart-background"] ? (w(), y("foreignObject", {
|
|
1588
|
+
key: 0,
|
|
1589
|
+
x: 0,
|
|
1590
|
+
y: 0,
|
|
1591
|
+
width: U.value.width <= 0 ? 10 : U.value.width,
|
|
1592
|
+
height: U.value.height <= 0 ? 10 : U.value.height,
|
|
1593
|
+
style: { pointerEvents: "none" }
|
|
1594
|
+
}, [D(t.$slots, "chart-background", {}, void 0, !0)], 8, lt)) : v("", !0),
|
|
1595
|
+
I.value.type === "classic" && !isNaN(Ar.value / q.value) ? (w(), y("defs", ut, [z.value.useGradient ? (w(), _(Ae, {
|
|
1596
|
+
key: 0,
|
|
1597
|
+
t: "radial",
|
|
1598
|
+
id: `gradient_${P.value}`,
|
|
1599
|
+
stops: [
|
|
1600
|
+
[
|
|
1601
|
+
"0%",
|
|
1602
|
+
k(u)(z.value.backgroundColor, 0),
|
|
1603
|
+
0
|
|
1604
|
+
],
|
|
1605
|
+
[
|
|
1606
|
+
`${(1 - Ar.value / q.value) * 100}%`,
|
|
1607
|
+
k(u)("#FFFFFF", 0),
|
|
1608
|
+
0
|
|
1609
|
+
],
|
|
1610
|
+
[
|
|
1611
|
+
`${(1 - Ar.value / q.value / 2) * 100}%`,
|
|
1612
|
+
k(u)("#FFFFFF", z.value.gradientIntensity),
|
|
1613
|
+
1
|
|
1614
|
+
],
|
|
1615
|
+
[
|
|
1616
|
+
"100%",
|
|
1617
|
+
k(u)(z.value.backgroundColor, 0),
|
|
1618
|
+
0
|
|
1619
|
+
]
|
|
1620
|
+
]
|
|
1621
|
+
}, null, 8, ["id", "stops"])) : v("", !0)])) : v("", !0),
|
|
1622
|
+
I.value.type === "polar" ? (w(), y("defs", dt, [(w(!0), y(h, null, E(X.value, (e, t) => (w(), _(Ae, {
|
|
1623
|
+
t: "radial",
|
|
1624
|
+
id: `polar_gradient_${t}_${P.value}`,
|
|
1625
|
+
key: `pg_${t}_${P.value}`,
|
|
1626
|
+
cx: (isNaN(e.middlePoint.x / U.value.width * 100) ? 0 : e.middlePoint.x / U.value.width * 100) + "%",
|
|
1627
|
+
cy: (isNaN(e.middlePoint.y / U.value.height * 100) ? 0 : e.middlePoint.y / U.value.height * 100) + "%",
|
|
1628
|
+
r: "62%",
|
|
1629
|
+
stops: [[
|
|
1630
|
+
"0%",
|
|
1631
|
+
k(ee)(J.value[t].color, .05),
|
|
1632
|
+
z.value.gradientIntensity / 100
|
|
1633
|
+
], [
|
|
1634
|
+
"100%",
|
|
1635
|
+
J.value[t].color,
|
|
1636
|
+
1
|
|
1637
|
+
]]
|
|
1638
|
+
}, null, 8, [
|
|
1639
|
+
"id",
|
|
1640
|
+
"cx",
|
|
1641
|
+
"cy",
|
|
1642
|
+
"stops"
|
|
1643
|
+
]))), 128))])) : v("", !0),
|
|
1644
|
+
b("defs", null, [
|
|
1645
|
+
b("filter", {
|
|
1646
|
+
id: `blur_${P.value}`,
|
|
1647
|
+
x: "-50%",
|
|
1648
|
+
y: "-50%",
|
|
1649
|
+
width: "200%",
|
|
1650
|
+
height: "200%"
|
|
1651
|
+
}, [b("feGaussianBlur", {
|
|
1652
|
+
in: "SourceGraphic",
|
|
1653
|
+
stdDeviation: 2,
|
|
1654
|
+
id: `blur_std_${P.value}`
|
|
1655
|
+
}, null, 8, pt), n[5] ||= b("feColorMatrix", {
|
|
1656
|
+
type: "saturate",
|
|
1657
|
+
values: "0"
|
|
1658
|
+
}, null, -1)], 8, ft),
|
|
1659
|
+
b("filter", {
|
|
1660
|
+
id: `shadow_${P.value}`,
|
|
1661
|
+
"color-interpolation-filters": "sRGB"
|
|
1662
|
+
}, [b("feDropShadow", {
|
|
1663
|
+
dx: "0",
|
|
1664
|
+
dy: "0",
|
|
1665
|
+
stdDeviation: "10",
|
|
1666
|
+
"flood-opacity": "0.5",
|
|
1667
|
+
"flood-color": R.value.shadowColor
|
|
1668
|
+
}, null, 8, ht)], 8, mt),
|
|
1669
|
+
b("filter", {
|
|
1670
|
+
id: `drop_shadow_${P.value}`,
|
|
1671
|
+
"color-interpolation-filters": "sRGB",
|
|
1672
|
+
x: "-50%",
|
|
1673
|
+
y: "-50%",
|
|
1674
|
+
width: "200%",
|
|
1675
|
+
height: "200%"
|
|
1676
|
+
}, [b("feDropShadow", {
|
|
1677
|
+
dx: "0",
|
|
1678
|
+
dy: "0",
|
|
1679
|
+
stdDeviation: "3",
|
|
1680
|
+
"flood-opacity": "1",
|
|
1681
|
+
"flood-color": R.value.shadowColor
|
|
1682
|
+
}, null, 8, _t)], 8, gt)
|
|
1683
|
+
]),
|
|
1684
|
+
I.value.type === "classic" ? (w(!0), y(h, { key: 3 }, E(J.value.filter((e) => !e.ghost), (e, t) => (w(), y("g", null, [Z(e) && H.value.dataLabels.show ? (w(), y("path", {
|
|
1685
|
+
key: 0,
|
|
1686
|
+
d: k(Q)[t]?.connectorPath || k(re)(e, {
|
|
1687
|
+
x: U.value.width / 2,
|
|
1688
|
+
y: U.value.height / 2
|
|
1689
|
+
}, 16, 16, !1, !1, Ar.value, 12, sr.value.curvedMarkers),
|
|
1690
|
+
stroke: e.color,
|
|
1691
|
+
"stroke-width": "1",
|
|
1692
|
+
"stroke-linecap": "round",
|
|
1693
|
+
"stroke-linejoin": "round",
|
|
1694
|
+
fill: "none",
|
|
1695
|
+
filter: li(t)
|
|
1696
|
+
}, null, 8, vt)) : v("", !0)]))), 256)) : v("", !0),
|
|
1697
|
+
I.value.type === "polar" ? (w(!0), y(h, { key: 4 }, E(J.value.filter((e) => !e.ghost), (e, t) => (w(), y("g", null, [Z(e) && H.value.dataLabels.show ? (w(), y("path", {
|
|
1698
|
+
key: 0,
|
|
1699
|
+
d: `M ${k(i)({
|
|
1700
|
+
initX: X.value[t].middlePoint.x,
|
|
1701
|
+
initY: X.value[t].middlePoint.y,
|
|
1702
|
+
offset: 24,
|
|
1703
|
+
centerX: U.value.width / 2,
|
|
1704
|
+
centerY: U.value.height / 2
|
|
1705
|
+
}).x},${k(i)({
|
|
1706
|
+
initX: X.value[t].middlePoint.x,
|
|
1707
|
+
initY: X.value[t].middlePoint.y,
|
|
1708
|
+
offset: 24,
|
|
1709
|
+
centerX: U.value.width / 2,
|
|
1710
|
+
centerY: U.value.height / 2
|
|
1711
|
+
}).y} ${X.value[t].middlePoint.x},${X.value[t].middlePoint.y}`,
|
|
1712
|
+
stroke: e.color,
|
|
1713
|
+
"stroke-width": "1",
|
|
1714
|
+
"stroke-linecap": "round",
|
|
1715
|
+
"stroke-linejoin": "round",
|
|
1716
|
+
fill: "none",
|
|
1717
|
+
filter: li(t),
|
|
1718
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1719
|
+
}, null, 12, yt)) : v("", !0)]))), 256)) : v("", !0),
|
|
1720
|
+
I.value.type === "classic" && R.value.useShadow ? (w(), y("circle", {
|
|
1721
|
+
key: 5,
|
|
1722
|
+
cx: U.value.width / 2,
|
|
1723
|
+
cy: U.value.height / 2,
|
|
1724
|
+
r: q.value <= 0 ? 10 : q.value,
|
|
1725
|
+
fill: z.value.backgroundColor,
|
|
1726
|
+
filter: `url(#shadow_${P.value})`
|
|
1727
|
+
}, null, 8, bt)) : v("", !0),
|
|
1728
|
+
t.$slots.pattern ? (w(), y("g", xt, [(w(!0), y(h, null, E(e.dataset, (e, n) => (w(), y("defs", { key: `pattern-${e.patternIndex}` }, [D(t.$slots, "pattern", We({ ref_for: !0 }, {
|
|
1729
|
+
seriesIndex: n,
|
|
1730
|
+
patternId: `pattern_${P.value}_${n}`
|
|
1731
|
+
}), void 0, !0)]))), 128))])) : v("", !0),
|
|
1732
|
+
$.value && I.value.type === "classic" ? (w(), y(h, { key: 7 }, [
|
|
1733
|
+
(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1734
|
+
stroke: z.value.backgroundColor,
|
|
1735
|
+
d: e.arcSlice,
|
|
1736
|
+
fill: "#FFFFFF"
|
|
1737
|
+
}, null, 8, St))), 256)),
|
|
1738
|
+
(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1739
|
+
class: "vue-ui-donut-arc-path",
|
|
1740
|
+
d: e.arcSlice,
|
|
1741
|
+
fill: e.color,
|
|
1742
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : R.value.borderColor,
|
|
1743
|
+
"stroke-width": R.value.borderWidth,
|
|
1744
|
+
filter: li(t)
|
|
1745
|
+
}, null, 8, Ct))), 256)),
|
|
1746
|
+
t.$slots.pattern ? (w(), y("g", wt, [(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1747
|
+
class: "vue-ui-donut-arc-path",
|
|
1748
|
+
d: e.arcSlice,
|
|
1749
|
+
fill: `url(#${e.pattern})`,
|
|
1750
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : R.value.borderColor,
|
|
1751
|
+
"stroke-width": R.value.borderWidth,
|
|
1752
|
+
filter: li(t)
|
|
1753
|
+
}, null, 8, Tt))), 256))])) : v("", !0)
|
|
1754
|
+
], 64)) : v("", !0),
|
|
1755
|
+
$.value && I.value.type === "polar" ? (w(), y(h, { key: 8 }, [J.value.length > 1 ? (w(), y("g", Et, [
|
|
1756
|
+
(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1757
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : R.value.borderColor,
|
|
1758
|
+
d: X.value[t].path,
|
|
1759
|
+
fill: "#FFFFFF",
|
|
1760
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1761
|
+
}, null, 12, Dt))), 256)),
|
|
1762
|
+
R.value.useShadow ? (w(), y("g", Ot, [(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1763
|
+
class: "vue-ui-donut-arc-path",
|
|
1764
|
+
d: X.value[t].path,
|
|
1765
|
+
fill: "transparent",
|
|
1766
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : sr.value.donut.borderColor,
|
|
1767
|
+
"stroke-width": R.value.borderWidth,
|
|
1768
|
+
filter: `url(#drop_shadow_${P.value})`,
|
|
1769
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1770
|
+
}, null, 12, kt))), 256))])) : v("", !0),
|
|
1771
|
+
t.$slots.pattern ? (w(), y("g", At, [(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1772
|
+
class: "vue-ui-donut-arc-path",
|
|
1773
|
+
d: X.value[t].path,
|
|
1774
|
+
fill: `url(#${e.pattern})`,
|
|
1775
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : sr.value.donut.borderColor,
|
|
1776
|
+
"stroke-width": R.value.borderWidth,
|
|
1777
|
+
filter: li(t),
|
|
1778
|
+
style: C({
|
|
1779
|
+
transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1780
|
+
transformOrigin: "center"
|
|
1781
|
+
})
|
|
1782
|
+
}, null, 12, jt))), 256))])) : v("", !0),
|
|
1783
|
+
(w(!0), y(h, null, E(Y.value, (e, t) => (w(), y("path", {
|
|
1784
|
+
class: "vue-ui-donut-arc-path",
|
|
1785
|
+
d: X.value[t].path,
|
|
1786
|
+
fill: z.value.useGradient ? `url(#polar_gradient_${t}_${P.value})` : e.color,
|
|
1787
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : R.value.borderColor,
|
|
1788
|
+
"stroke-width": R.value.borderWidth,
|
|
1789
|
+
filter: li(t),
|
|
1790
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1791
|
+
}, null, 12, Mt))), 256))
|
|
1792
|
+
])) : (w(), y("g", Nt, [t.$slots.pattern ? (w(), y("circle", {
|
|
1793
|
+
key: 0,
|
|
1794
|
+
cx: U.value.width / 2,
|
|
1795
|
+
cy: U.value.height / 2,
|
|
1796
|
+
r: q.value,
|
|
1797
|
+
fill: `url(#pattern_${P.value}_${J.value[0].patternIndex})`,
|
|
1798
|
+
stroke: z.value.backgroundColor,
|
|
1799
|
+
"stroke-width": R.value.borderWidth
|
|
1800
|
+
}, null, 8, Pt)) : v("", !0), b("circle", {
|
|
1801
|
+
cx: U.value.width / 2,
|
|
1802
|
+
cy: U.value.height / 2,
|
|
1803
|
+
r: q.value,
|
|
1804
|
+
fill: z.value.useGradient ? `url(#polar_gradient_0_${P.value})` : J.value[0].color,
|
|
1805
|
+
stroke: z.value.backgroundColor,
|
|
1806
|
+
"stroke-width": R.value.borderWidth
|
|
1807
|
+
}, null, 8, Ft)]))], 64)) : (w(), y(h, { key: 9 }, [I.value.type === "classic" && !Kr.value ? (w(), y("g", It, [(w(!0), y(h, null, E(qr.value, (e, t) => (w(), y("path", {
|
|
1808
|
+
class: "vue-ui-donut-arc-path",
|
|
1809
|
+
d: e.arcSlice,
|
|
1810
|
+
fill: e.color,
|
|
1811
|
+
stroke: z.value.backgroundColor,
|
|
1812
|
+
"stroke-width": R.value.borderWidth
|
|
1813
|
+
}, null, 8, Lt))), 256))])) : v("", !0), b("circle", {
|
|
1814
|
+
cx: U.value.width / 2,
|
|
1815
|
+
cy: U.value.height / 2,
|
|
1816
|
+
r: q.value <= 0 ? 10 : q.value,
|
|
1817
|
+
fill: "transparent",
|
|
1818
|
+
stroke: z.value.backgroundColor
|
|
1819
|
+
}, null, 8, Rt)], 64)),
|
|
1820
|
+
z.value.useGradient && I.value.type === "classic" ? (w(), y("circle", {
|
|
1821
|
+
key: 10,
|
|
1822
|
+
cx: U.value.width / 2,
|
|
1823
|
+
cy: U.value.height / 2,
|
|
1824
|
+
r: q.value <= 0 ? 10 : q.value,
|
|
1825
|
+
fill: `url(#gradient_${P.value})`
|
|
1826
|
+
}, null, 8, zt)) : v("", !0),
|
|
1827
|
+
b("circle", {
|
|
1828
|
+
ref_key: "circle_hollow",
|
|
1829
|
+
ref: Nn,
|
|
1830
|
+
style: { pointerEvents: "none" },
|
|
1831
|
+
fill: "none",
|
|
1832
|
+
cx: U.value.width / 2,
|
|
1833
|
+
cy: U.value.height / 2,
|
|
1834
|
+
r: Math.max(.1, Ar.value * 1.7)
|
|
1835
|
+
}, null, 8, Bt),
|
|
1836
|
+
$.value ? (w(), y(h, { key: 11 }, [J.value.length > 1 || I.value.type === "classic" ? (w(), y("g", Vt, [(w(!0), y(h, null, E(J.value.filter((e) => !e.ghost), (e, t) => (w(), y("path", {
|
|
1837
|
+
d: I.value.type === "classic" ? e.arcSlice : X.value[t].path,
|
|
1838
|
+
stroke: R.value.borderColorAuto ? z.value.backgroundColor : R.value.borderColor,
|
|
1839
|
+
fill: F.value === t ? R.value.selectedColor : "transparent",
|
|
1840
|
+
onMouseenter: (n) => ai({
|
|
1841
|
+
datapoint: e,
|
|
1842
|
+
relativeIndex: t,
|
|
1843
|
+
seriesIndex: e.seriesIndex,
|
|
1844
|
+
show: !0
|
|
1845
|
+
}),
|
|
1846
|
+
onMouseleave: (t) => ii({
|
|
1847
|
+
datapoint: e,
|
|
1848
|
+
seriesIndex: e.seriesIndex
|
|
1849
|
+
}),
|
|
1850
|
+
onClick: (n) => bi(e, t)
|
|
1851
|
+
}, null, 40, Ht))), 256))])) : (w(), y("g", Ut, [b("circle", {
|
|
1852
|
+
cx: U.value.width / 2,
|
|
1853
|
+
cy: U.value.height / 2,
|
|
1854
|
+
r: q.value,
|
|
1855
|
+
fill: "transparent",
|
|
1856
|
+
onMouseenter: n[0] ||= (e) => ai({
|
|
1857
|
+
datapoint: J.value[0],
|
|
1858
|
+
relativeIndex: 0,
|
|
1859
|
+
seriesIndex: J.value[0].seriesIndex,
|
|
1860
|
+
show: !0
|
|
1861
|
+
}),
|
|
1862
|
+
onMouseleave: n[1] ||= (e) => ii({
|
|
1863
|
+
datapoint: J.value[0],
|
|
1864
|
+
seriesIndex: J.value[0].seriesIndex
|
|
1865
|
+
}),
|
|
1866
|
+
onClick: n[2] ||= (e) => bi(J.value[0], t.i)
|
|
1867
|
+
}, null, 40, Wt)]))], 64)) : v("", !0),
|
|
1868
|
+
I.value.type === "classic" ? (w(), y("g", {
|
|
1869
|
+
key: 12,
|
|
1870
|
+
ref_key: "G_hollow",
|
|
1871
|
+
ref: Mn,
|
|
1872
|
+
class: "vue-data-ui-donut-hollow-labels"
|
|
1873
|
+
}, [
|
|
1874
|
+
L.value.hollow.total.show ? (w(), y("text", {
|
|
1875
|
+
key: 0,
|
|
1876
|
+
"text-anchor": "middle",
|
|
1877
|
+
x: U.value.width / 2,
|
|
1878
|
+
y: U.value.height / 2 - (L.value.hollow.average.show ? L.value.hollow.total.fontSize : 0) + L.value.hollow.total.offsetY,
|
|
1879
|
+
fill: L.value.hollow.total.color,
|
|
1880
|
+
"font-size": L.value.hollow.total.fontSize,
|
|
1881
|
+
style: C(`font-weight:${L.value.hollow.total.bold ? "bold" : ""}`)
|
|
1882
|
+
}, O(L.value.hollow.total.text), 13, Gt)) : v("", !0),
|
|
1883
|
+
L.value.hollow.total.show ? (w(), y("text", {
|
|
1884
|
+
key: 1,
|
|
1885
|
+
"text-anchor": "middle",
|
|
1886
|
+
x: U.value.width / 2,
|
|
1887
|
+
y: U.value.height / 2 + L.value.hollow.total.fontSize - (L.value.hollow.average.show ? L.value.hollow.total.fontSize : 0) + L.value.hollow.total.value.offsetY,
|
|
1888
|
+
fill: L.value.hollow.total.value.color,
|
|
1889
|
+
"font-size": L.value.hollow.total.value.fontSize,
|
|
1890
|
+
style: C(`font-weight:${L.value.hollow.total.value.bold ? "bold" : ""}`)
|
|
1891
|
+
}, O(k(m)(L.value.hollow.total.value.formatter, $.value, k(d)({
|
|
1892
|
+
p: L.value.hollow.total.value.prefix,
|
|
1893
|
+
v: $.value,
|
|
1894
|
+
s: L.value.hollow.total.value.suffix
|
|
1895
|
+
}))), 13, Kt)) : v("", !0),
|
|
1896
|
+
L.value.hollow.average.show ? (w(), y("text", {
|
|
1897
|
+
key: 2,
|
|
1898
|
+
"text-anchor": "middle",
|
|
1899
|
+
x: U.value.width / 2,
|
|
1900
|
+
y: U.value.height / 2 + (L.value.hollow.total.show ? L.value.hollow.average.fontSize : 0) + L.value.hollow.average.offsetY,
|
|
1901
|
+
fill: L.value.hollow.average.color,
|
|
1902
|
+
"font-size": L.value.hollow.average.fontSize,
|
|
1903
|
+
style: C(`font-weight:${L.value.hollow.average.bold ? "bold" : ""}`)
|
|
1904
|
+
}, O(L.value.hollow.average.text), 13, qt)) : v("", !0),
|
|
1905
|
+
L.value.hollow.average.show ? (w(), y("text", {
|
|
1906
|
+
key: 3,
|
|
1907
|
+
"text-anchor": "middle",
|
|
1908
|
+
x: U.value.width / 2,
|
|
1909
|
+
y: U.value.height / 2 + (L.value.hollow.total.show ? L.value.hollow.average.fontSize : 0) + L.value.hollow.average.fontSize + L.value.hollow.average.value.offsetY,
|
|
1910
|
+
fill: L.value.hollow.average.value.color,
|
|
1911
|
+
"font-size": L.value.hollow.average.value.fontSize,
|
|
1912
|
+
style: C(`font-weight:${L.value.hollow.average.value.bold ? "bold" : ""}`)
|
|
1913
|
+
}, O(Nr.value || B.value ? "--" : k(m)(L.value.hollow.average.value.formatter, k(de)(ei.value), k(d)({
|
|
1914
|
+
p: L.value.hollow.average.value.prefix,
|
|
1915
|
+
v: k(de)(ei.value),
|
|
1916
|
+
s: L.value.hollow.average.value.suffix,
|
|
1917
|
+
r: L.value.hollow.average.value.rounding
|
|
1918
|
+
}))), 13, Jt)) : v("", !0)
|
|
1919
|
+
], 512)) : v("", !0),
|
|
1920
|
+
(w(!0), y(h, null, E(Y.value.filter((e) => !e.ghost), (e, n) => (w(), y("g", {
|
|
1921
|
+
filter: li(n),
|
|
1922
|
+
key: e.seriesIndex,
|
|
1923
|
+
opacity: ui(e)
|
|
1924
|
+
}, [L.value.dataLabels.useLabelSlots ? (w(), y("g", Xt, [(w(), y("foreignObject", {
|
|
1925
|
+
x: k(p)(e, !0).anchor === "end" ? k(p)(e).x - 120 : k(p)(e, !0).anchor === "middle" ? k(p)(e).x - 60 : k(p)(e).x,
|
|
1926
|
+
y: k(ce)(e) - (gi.value ? 20 : 0),
|
|
1927
|
+
width: "120",
|
|
1928
|
+
height: "60",
|
|
1929
|
+
style: { overflow: "visible" }
|
|
1930
|
+
}, [b("div", null, [D(t.$slots, "dataLabel", We({ ref_for: !0 }, {
|
|
1931
|
+
datapoint: e,
|
|
1932
|
+
isBlur: !I.value.useBlurOnHover || [null, void 0].includes(F.value) || F.value === n,
|
|
1933
|
+
isSafari: gi.value,
|
|
1934
|
+
isVisible: Z(e) && H.value.dataLabels.show,
|
|
1935
|
+
textAlign: k(p)(e, !0, 16, !0).anchor,
|
|
1936
|
+
flexAlign: k(p)(e, !0, 16).anchor,
|
|
1937
|
+
percentage: Zr(e, Y.value)
|
|
1938
|
+
}), void 0, !0)])], 8, Zt))])) : (w(), y("g", Qt, [I.value.type === "classic" ? (w(), y(h, { key: 0 }, [Z(e) && H.value.dataLabels.show ? (w(), y("circle", {
|
|
1939
|
+
key: 0,
|
|
1940
|
+
cx: k(Q)[n]?.markerX ?? k(p)(e).x,
|
|
1941
|
+
cy: k(Q)[n]?.markerY ?? k(ce)(e) - 3.5,
|
|
1942
|
+
fill: e.color,
|
|
1943
|
+
stroke: z.value.backgroundColor,
|
|
1944
|
+
"stroke-width": 1,
|
|
1945
|
+
r: 3,
|
|
1946
|
+
filter: !I.value.useBlurOnHover || [null, void 0].includes(F.value) || F.value === n ? "" : `url(#blur_${P.value})`,
|
|
1947
|
+
onClick: (t) => bi(e, n),
|
|
1948
|
+
onMouseenter: (t) => ai({
|
|
1949
|
+
datapoint: e,
|
|
1950
|
+
relativeIndex: n,
|
|
1951
|
+
seriesIndex: e.seriesIndex,
|
|
1952
|
+
show: !0
|
|
1953
|
+
}),
|
|
1954
|
+
onMouseleave: (t) => ii({
|
|
1955
|
+
datapoint: e,
|
|
1956
|
+
seriesIndex: e.seriesIndex
|
|
1957
|
+
})
|
|
1958
|
+
}, null, 40, $t)) : v("", !0), L.value.dataLabels.oneLine || k(Q)[n] ? tt((w(), y("text", {
|
|
1959
|
+
key: 1,
|
|
1960
|
+
class: "vue-data-ui-datalabel-inline",
|
|
1961
|
+
"text-anchor": k(Q)[n]?.textAnchor || k(p)(e, !0, 12).anchor,
|
|
1962
|
+
x: k(Q)[n]?.labelX ?? k(p)(e, !0, 12).x,
|
|
1963
|
+
y: k(Q)[n]?.labelY ?? k(ce)(e),
|
|
1964
|
+
onClick: (t) => bi(e, n),
|
|
1965
|
+
onMouseenter: (t) => ai({
|
|
1966
|
+
datapoint: e,
|
|
1967
|
+
relativeIndex: n,
|
|
1968
|
+
seriesIndex: e.seriesIndex,
|
|
1969
|
+
show: !0
|
|
1970
|
+
}),
|
|
1971
|
+
onMouseleave: (t) => ii({
|
|
1972
|
+
datapoint: e,
|
|
1973
|
+
seriesIndex: e.seriesIndex
|
|
1974
|
+
}),
|
|
1975
|
+
innerHTML: si(e, n, !!k(Q)[n])
|
|
1976
|
+
}, null, 40, en)), [[$e, Z(e) && H.value.dataLabels.show]]) : (w(), y(h, { key: 2 }, [tt(b("text", {
|
|
1977
|
+
class: "vue-data-ui-datalabel-value",
|
|
1978
|
+
"text-anchor": k(Q)[n]?.textAnchor || k(p)(e, !0, 12).anchor,
|
|
1979
|
+
x: k(Q)[n]?.labelX ?? k(p)(e, !0, 12).x,
|
|
1980
|
+
y: k(Q)[n]?.labelY ?? k(ce)(e),
|
|
1981
|
+
fill: L.value.percentage.color,
|
|
1982
|
+
"font-size": Xn.value + "px",
|
|
1983
|
+
style: C(`font-weight:${L.value.percentage.bold ? "bold" : ""}`),
|
|
1984
|
+
onClick: (t) => bi(e, n),
|
|
1985
|
+
onMouseenter: (t) => ai({
|
|
1986
|
+
datapoint: e,
|
|
1987
|
+
relativeIndex: n,
|
|
1988
|
+
seriesIndex: e.seriesIndex,
|
|
1989
|
+
show: !0
|
|
1990
|
+
}),
|
|
1991
|
+
onMouseleave: (t) => ii({
|
|
1992
|
+
datapoint: e,
|
|
1993
|
+
seriesIndex: e.seriesIndex
|
|
1994
|
+
})
|
|
1995
|
+
}, O(yi(e)), 45, tn), [[$e, Z(e) && H.value.dataLabels.show]]), tt(b("text", {
|
|
1996
|
+
class: "vue-data-ui-datalabel-name",
|
|
1997
|
+
"text-anchor": k(Q)[n]?.textAnchor || k(p)(e).anchor,
|
|
1998
|
+
x: k(Q)[n]?.labelX ?? k(p)(e, !0, 12).x,
|
|
1999
|
+
y: (k(Q)[n]?.labelY ?? k(ce)(e)) + N.value * 1.2,
|
|
2000
|
+
fill: L.value.name.color,
|
|
2001
|
+
"font-size": N.value + "px",
|
|
2002
|
+
style: C(`font-weight:${L.value.name.bold ? "bold" : ""}`),
|
|
2003
|
+
onClick: (t) => bi(e, n),
|
|
2004
|
+
onMouseenter: (t) => ai({
|
|
2005
|
+
datapoint: e,
|
|
2006
|
+
relativeIndex: n,
|
|
2007
|
+
seriesIndex: e.seriesIndex,
|
|
2008
|
+
show: !0
|
|
2009
|
+
}),
|
|
2010
|
+
onMouseleave: (t) => ii({
|
|
2011
|
+
datapoint: e,
|
|
2012
|
+
seriesIndex: e.seriesIndex
|
|
2013
|
+
}),
|
|
2014
|
+
innerHTML: k(a)({
|
|
2015
|
+
content: e.name,
|
|
2016
|
+
fontSize: N.value,
|
|
2017
|
+
fill: L.value.name.color,
|
|
2018
|
+
x: k(Q)[n]?.labelX ?? k(p)(e, !0, 12).x,
|
|
2019
|
+
y: (k(Q)[n]?.labelY ?? k(ce)(e)) + N.value
|
|
2020
|
+
})
|
|
2021
|
+
}, null, 44, nn), [[$e, Z(e, !0, 12) && H.value.dataLabels.show && L.value.name.show]])], 64))], 64)) : v("", !0), I.value.type === "polar" ? (w(), y(h, { key: 1 }, [Z(e) && H.value.dataLabels.show ? (w(), y("circle", {
|
|
2022
|
+
key: 0,
|
|
2023
|
+
cx: k(i)({
|
|
2024
|
+
initX: X.value[n].middlePoint.x,
|
|
2025
|
+
initY: X.value[n].middlePoint.y,
|
|
2026
|
+
offset: 24,
|
|
2027
|
+
centerX: U.value.width / 2,
|
|
2028
|
+
centerY: U.value.height / 2
|
|
2029
|
+
}).x,
|
|
2030
|
+
cy: k(i)({
|
|
2031
|
+
initX: X.value[n].middlePoint.x,
|
|
2032
|
+
initY: X.value[n].middlePoint.y,
|
|
2033
|
+
offset: 24,
|
|
2034
|
+
centerX: U.value.width / 2,
|
|
2035
|
+
centerY: U.value.height / 2
|
|
2036
|
+
}).y,
|
|
2037
|
+
fill: e.color,
|
|
2038
|
+
stroke: z.value.backgroundColor,
|
|
2039
|
+
"stroke-width": 1,
|
|
2040
|
+
r: 3,
|
|
2041
|
+
filter: !I.value.useBlurOnHover || [null, void 0].includes(F.value) || F.value === n ? "" : `url(#blur_${P.value})`,
|
|
2042
|
+
onClick: (t) => bi(e, n),
|
|
2043
|
+
onMouseenter: (t) => ai({
|
|
2044
|
+
datapoint: e,
|
|
2045
|
+
relativeIndex: n,
|
|
2046
|
+
seriesIndex: e.seriesIndex,
|
|
2047
|
+
show: !0
|
|
2048
|
+
}),
|
|
2049
|
+
onMouseleave: (t) => ii({
|
|
2050
|
+
datapoint: e,
|
|
2051
|
+
seriesIndex: e.seriesIndex
|
|
2052
|
+
}),
|
|
2053
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
2054
|
+
}, null, 44, rn)) : v("", !0), L.value.dataLabels.oneLine ? tt((w(), y("text", {
|
|
2055
|
+
key: 1,
|
|
2056
|
+
class: "vue-data-ui-datalabel-inline",
|
|
2057
|
+
"text-anchor": Jr(X.value[n].middlePoint),
|
|
2058
|
+
x: k(i)({
|
|
2059
|
+
initX: X.value[n].middlePoint.x,
|
|
2060
|
+
initY: X.value[n].middlePoint.y,
|
|
2061
|
+
offset: 42,
|
|
2062
|
+
centerX: U.value.width / 2,
|
|
2063
|
+
centerY: U.value.height / 2
|
|
2064
|
+
}).x,
|
|
2065
|
+
y: k(i)({
|
|
2066
|
+
initX: X.value[n].middlePoint.x,
|
|
2067
|
+
initY: X.value[n].middlePoint.y,
|
|
2068
|
+
offset: 42,
|
|
2069
|
+
centerX: U.value.width / 2,
|
|
2070
|
+
centerY: U.value.height / 2
|
|
2071
|
+
}).y,
|
|
2072
|
+
style: C({ transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
|
|
2073
|
+
onClick: (t) => bi(e, n),
|
|
2074
|
+
onMouseenter: (t) => ai({
|
|
2075
|
+
datapoint: e,
|
|
2076
|
+
relativeIndex: n,
|
|
2077
|
+
seriesIndex: e.seriesIndex,
|
|
2078
|
+
show: !0
|
|
2079
|
+
}),
|
|
2080
|
+
onMouseleave: (t) => ii({
|
|
2081
|
+
datapoint: e,
|
|
2082
|
+
seriesIndex: e.seriesIndex
|
|
2083
|
+
}),
|
|
2084
|
+
innerHTML: ci(e, n)
|
|
2085
|
+
}, null, 44, an)), [[$e, Z(e) && H.value.dataLabels.show]]) : (w(), y(h, { key: 2 }, [Z(e) && H.value.dataLabels.show ? (w(), y("text", {
|
|
2086
|
+
key: 0,
|
|
2087
|
+
class: "vue-data-ui-datalabel-value",
|
|
2088
|
+
"text-anchor": Jr(X.value[n].middlePoint),
|
|
2089
|
+
x: k(i)({
|
|
2090
|
+
initX: X.value[n].middlePoint.x,
|
|
2091
|
+
initY: X.value[n].middlePoint.y,
|
|
2092
|
+
offset: 42,
|
|
2093
|
+
centerX: U.value.width / 2,
|
|
2094
|
+
centerY: U.value.height / 2
|
|
2095
|
+
}).x,
|
|
2096
|
+
y: k(i)({
|
|
2097
|
+
initX: X.value[n].middlePoint.x,
|
|
2098
|
+
initY: X.value[n].middlePoint.y,
|
|
2099
|
+
offset: 42,
|
|
2100
|
+
centerX: U.value.width / 2,
|
|
2101
|
+
centerY: U.value.height / 2
|
|
2102
|
+
}).y,
|
|
2103
|
+
fill: L.value.percentage.color,
|
|
2104
|
+
"font-size": Xn.value,
|
|
2105
|
+
style: C({
|
|
2106
|
+
transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2107
|
+
fontWeight: L.value.percentage.bold ? "bold" : "normal"
|
|
2108
|
+
}),
|
|
2109
|
+
onClick: (t) => bi(e, n),
|
|
2110
|
+
onMouseenter: (t) => ai({
|
|
2111
|
+
datapoint: e,
|
|
2112
|
+
relativeIndex: n,
|
|
2113
|
+
seriesIndex: e.seriesIndex,
|
|
2114
|
+
show: !0
|
|
2115
|
+
}),
|
|
2116
|
+
onMouseleave: (t) => ii({
|
|
2117
|
+
datapoint: e,
|
|
2118
|
+
seriesIndex: e.seriesIndex
|
|
2119
|
+
})
|
|
2120
|
+
}, O(yi(e)), 45, on)) : v("", !0), Z(e, !0, 12) && H.value.dataLabels.show && L.value.name.show ? (w(), y("text", {
|
|
2121
|
+
key: 1,
|
|
2122
|
+
class: "vue-data-ui-datalabel-name",
|
|
2123
|
+
"text-anchor": Jr(X.value[n].middlePoint),
|
|
2124
|
+
x: k(i)({
|
|
2125
|
+
initX: X.value[n].middlePoint.x,
|
|
2126
|
+
initY: X.value[n].middlePoint.y,
|
|
2127
|
+
offset: 42,
|
|
2128
|
+
centerX: U.value.width / 2,
|
|
2129
|
+
centerY: U.value.height / 2
|
|
2130
|
+
}).x,
|
|
2131
|
+
y: k(i)({
|
|
2132
|
+
initX: X.value[n].middlePoint.x,
|
|
2133
|
+
initY: X.value[n].middlePoint.y,
|
|
2134
|
+
offset: 42,
|
|
2135
|
+
centerX: U.value.width / 2,
|
|
2136
|
+
centerY: U.value.height / 2
|
|
2137
|
+
}).y + N.value * 1.2,
|
|
2138
|
+
fill: L.value.name.color,
|
|
2139
|
+
"font-size": N.value,
|
|
2140
|
+
style: C({
|
|
2141
|
+
transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2142
|
+
fontWeight: L.value.name.bold ? "bold" : "normal"
|
|
2143
|
+
}),
|
|
2144
|
+
onClick: (t) => bi(e, n),
|
|
2145
|
+
onMouseenter: (t) => ai({
|
|
2146
|
+
datapoint: e,
|
|
2147
|
+
relativeIndex: n,
|
|
2148
|
+
seriesIndex: e.seriesIndex,
|
|
2149
|
+
show: !0
|
|
2150
|
+
}),
|
|
2151
|
+
onMouseleave: (t) => ii({
|
|
2152
|
+
datapoint: e,
|
|
2153
|
+
seriesIndex: e.seriesIndex
|
|
2154
|
+
}),
|
|
2155
|
+
innerHTML: k(a)({
|
|
2156
|
+
content: e.name,
|
|
2157
|
+
fontSize: N.value,
|
|
2158
|
+
fill: L.value.name.color,
|
|
2159
|
+
x: k(i)({
|
|
2160
|
+
initX: X.value[n].middlePoint.x,
|
|
2161
|
+
initY: X.value[n].middlePoint.y,
|
|
2162
|
+
offset: 42,
|
|
2163
|
+
centerX: U.value.width / 2,
|
|
2164
|
+
centerY: U.value.height / 2
|
|
2165
|
+
}).x,
|
|
2166
|
+
y: k(i)({
|
|
2167
|
+
initX: X.value[n].middlePoint.x,
|
|
2168
|
+
initY: X.value[n].middlePoint.y,
|
|
2169
|
+
offset: 42,
|
|
2170
|
+
centerX: U.value.width / 2,
|
|
2171
|
+
centerY: U.value.height / 2
|
|
2172
|
+
}).y + N.value * 1.2
|
|
2173
|
+
})
|
|
2174
|
+
}, null, 44, sn)) : v("", !0)], 64))], 64)) : v("", !0)])), H.value.dataLabels.show && z.value.comments.show && e.comment ? (w(), y("g", cn, [Z(e) && I.value.type === "classic" ? (w(), y("foreignObject", {
|
|
2175
|
+
key: 0,
|
|
2176
|
+
x: z.value.comments.offsetX + (k(p)(e, !0).anchor === "end" ? k(p)(e).x - z.value.comments.width : k(p)(e, !0).anchor === "middle" ? k(p)(e).x - z.value.comments.width / 2 : k(p)(e).x),
|
|
2177
|
+
y: k(ce)(e) + 24 + z.value.comments.offsetY,
|
|
2178
|
+
width: z.value.comments.width,
|
|
2179
|
+
height: "200",
|
|
2180
|
+
style: {
|
|
2181
|
+
overflow: "visible",
|
|
2182
|
+
"pointer-events": "none"
|
|
2183
|
+
}
|
|
2184
|
+
}, [b("div", null, [D(t.$slots, "plot-comment", { plot: {
|
|
2185
|
+
...e,
|
|
2186
|
+
textAlign: k(p)(e, !0, 16, !0).anchor,
|
|
2187
|
+
flexAlign: k(p)(e, !0, 16).anchor,
|
|
2188
|
+
isFirstLoad: B.value
|
|
2189
|
+
} }, void 0, !0)])], 8, ln)) : v("", !0), Z(e) && I.value.type === "polar" ? (w(), y("foreignObject", {
|
|
2190
|
+
key: 1,
|
|
2191
|
+
x: z.value.comments.offsetX + (Jr(X.value[n].middlePoint) === "end" ? k(i)({
|
|
2192
|
+
initX: X.value[n].middlePoint.x,
|
|
2193
|
+
initY: X.value[n].middlePoint.y,
|
|
2194
|
+
offset: 42,
|
|
2195
|
+
centerX: U.value.width / 2,
|
|
2196
|
+
centerY: U.value.height / 2
|
|
2197
|
+
}).x - z.value.comments.width : Jr(X.value[n].middlePoint) === "middle" ? k(i)({
|
|
2198
|
+
initX: X.value[n].middlePoint.x,
|
|
2199
|
+
initY: X.value[n].middlePoint.y,
|
|
2200
|
+
offset: 42,
|
|
2201
|
+
centerX: U.value.width / 2,
|
|
2202
|
+
centerY: U.value.height / 2
|
|
2203
|
+
}).x - z.value.comments.width / 2 : k(i)({
|
|
2204
|
+
initX: X.value[n].middlePoint.x,
|
|
2205
|
+
initY: X.value[n].middlePoint.y,
|
|
2206
|
+
offset: 42,
|
|
2207
|
+
centerX: U.value.width / 2,
|
|
2208
|
+
centerY: U.value.height / 2
|
|
2209
|
+
}).x),
|
|
2210
|
+
y: Yr(X.value[n]) + z.value.comments.offsetY,
|
|
2211
|
+
width: z.value.comments.width,
|
|
2212
|
+
height: "200",
|
|
2213
|
+
style: C({
|
|
2214
|
+
transition: B.value || !I.value.serieToggleAnimation.show ? "none" : `all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2215
|
+
overflow: "visible",
|
|
2216
|
+
pointerEvents: "none"
|
|
2217
|
+
})
|
|
2218
|
+
}, [b("div", null, [D(t.$slots, "plot-comment", { plot: {
|
|
2219
|
+
...e,
|
|
2220
|
+
textAlign: Jr(X.value[n].middlePoint),
|
|
2221
|
+
flexAlign: Jr(X.value[n].middlePoint),
|
|
2222
|
+
isFirstLoad: B.value
|
|
2223
|
+
} }, void 0, !0)])], 12, un)) : v("", !0)])) : v("", !0)], 8, Yt))), 128)),
|
|
2224
|
+
D(t.$slots, "svg", { svg: {
|
|
2225
|
+
...U.value,
|
|
2226
|
+
datapoints: J.value,
|
|
2227
|
+
isPrintingImg: k(wr) || k(Tr) || k(Pi),
|
|
2228
|
+
isPrintingSvg: k(Fi)
|
|
2229
|
+
} }, void 0, !0)
|
|
2230
|
+
], 512)], 46, ct)), t.$slots.hint ? (w(), y("div", dn, [D(t.$slots, "hint", S(x({
|
|
2231
|
+
hint: I.value.a11y.translations.keyboardNavigation,
|
|
2232
|
+
isVisible: Yn.value
|
|
2233
|
+
})), void 0, !0)])) : v("", !0)]),
|
|
2234
|
+
t.$slots.watermark ? (w(), y("div", fn, [D(t.$slots, "watermark", S(x({ isPrinting: k(wr) || k(Tr) || k(Pi) || k(Fi) })), void 0, !0)])) : v("", !0),
|
|
2235
|
+
b("div", { id: `legend-bottom-${P.value}` }, null, 8, pn),
|
|
2236
|
+
Un.value && (z.value.legend.show || t.$slots.legend) ? (w(), _(ze, {
|
|
2237
|
+
key: 6,
|
|
2238
|
+
to: z.value.legend.position === "top" ? `#legend-top-${P.value}` : `#legend-bottom-${P.value}`
|
|
2239
|
+
}, [b("div", {
|
|
2240
|
+
ref_key: "chartLegend",
|
|
2241
|
+
ref: Fn
|
|
2242
|
+
}, [D(t.$slots, "legend", { legend: Wr.value }, () => [z.value.legend.show ? (w(), _(Re, {
|
|
2243
|
+
key: `legend_${Hn.value}`,
|
|
2244
|
+
legendSet: Wr.value,
|
|
2245
|
+
config: Gr.value,
|
|
2246
|
+
onClickMarker: n[3] ||= ({ i: e }) => Rr(e),
|
|
2247
|
+
isCursorPointer: cr.value
|
|
2248
|
+
}, Be({
|
|
2249
|
+
item: A(({ legend: e, index: t }) => [b("div", {
|
|
2250
|
+
style: C(`opacity:${K.value.includes(t) ? .5 : 1}`),
|
|
2251
|
+
onClick: (t) => e.segregate()
|
|
2252
|
+
}, O(e.display), 13, mn)]),
|
|
2253
|
+
legendToggle: A(() => [Wr.value.length > 2 && z.value.legend.selectAllToggle.show && !k(ur) ? (w(), _(je, {
|
|
2254
|
+
key: 0,
|
|
2255
|
+
backgroundColor: z.value.legend.selectAllToggle.backgroundColor,
|
|
2256
|
+
color: z.value.legend.selectAllToggle.color,
|
|
2257
|
+
fontSize: z.value.legend.fontSize,
|
|
2258
|
+
checked: K.value.length > 0,
|
|
2259
|
+
isCursorPointer: cr.value,
|
|
2260
|
+
onToggle: Lr
|
|
2261
|
+
}, null, 8, [
|
|
2262
|
+
"backgroundColor",
|
|
2263
|
+
"color",
|
|
2264
|
+
"fontSize",
|
|
2265
|
+
"checked",
|
|
2266
|
+
"isCursorPointer"
|
|
2267
|
+
])) : v("", !0)]),
|
|
2268
|
+
_: 2
|
|
2269
|
+
}, [t.$slots.pattern ? {
|
|
2270
|
+
name: "legend-pattern",
|
|
2271
|
+
fn: A(({ legend: e, index: t }) => [He(Ee, {
|
|
2272
|
+
shape: e.shape,
|
|
2273
|
+
radius: 30,
|
|
2274
|
+
stroke: "none",
|
|
2275
|
+
plot: {
|
|
2276
|
+
x: 30,
|
|
2277
|
+
y: 30
|
|
2278
|
+
},
|
|
2279
|
+
fill: `url(#pattern_${P.value}_${t})`
|
|
2280
|
+
}, null, 8, ["shape", "fill"])]),
|
|
2281
|
+
key: "0"
|
|
2282
|
+
} : void 0]), 1032, [
|
|
2283
|
+
"legendSet",
|
|
2284
|
+
"config",
|
|
2285
|
+
"isCursorPointer"
|
|
2286
|
+
])) : v("", !0)], !0)], 512)], 8, ["to"])) : v("", !0),
|
|
2287
|
+
t.$slots.source ? (w(), y("div", {
|
|
2288
|
+
key: 7,
|
|
2289
|
+
ref_key: "source",
|
|
2290
|
+
ref: Rn,
|
|
2291
|
+
dir: "auto"
|
|
2292
|
+
}, [D(t.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
|
|
2293
|
+
t.$slots.hollow ? (w(), y("div", hn, [D(t.$slots, "hollow", S(x({
|
|
2294
|
+
total: $.value,
|
|
2295
|
+
average: ei.value,
|
|
2296
|
+
dataset: W.value,
|
|
2297
|
+
...U.value
|
|
2298
|
+
})), void 0, !0)])) : v("", !0),
|
|
2299
|
+
He(k(vn), {
|
|
2300
|
+
teleportTo: z.value.tooltip.teleportTo,
|
|
2301
|
+
show: H.value.showTooltip && rr.value,
|
|
2302
|
+
backgroundColor: z.value.tooltip.backgroundColor,
|
|
2303
|
+
color: z.value.tooltip.color,
|
|
2304
|
+
fontSize: z.value.tooltip.fontSize,
|
|
2305
|
+
borderRadius: z.value.tooltip.borderRadius,
|
|
2306
|
+
borderColor: z.value.tooltip.borderColor,
|
|
2307
|
+
borderWidth: z.value.tooltip.borderWidth,
|
|
2308
|
+
backgroundOpacity: z.value.tooltip.backgroundOpacity,
|
|
2309
|
+
position: z.value.tooltip.position,
|
|
2310
|
+
offsetX: z.value.tooltip.offsetX,
|
|
2311
|
+
offsetY: z.value.tooltip.offsetY,
|
|
2312
|
+
parent: M.value,
|
|
2313
|
+
content: ir.value,
|
|
2314
|
+
isCustom: ri.value,
|
|
2315
|
+
isFullscreen: mi.value,
|
|
2316
|
+
smooth: z.value.tooltip.smooth,
|
|
2317
|
+
backdropFilter: z.value.tooltip.backdropFilter,
|
|
2318
|
+
smoothForce: z.value.tooltip.smoothForce,
|
|
2319
|
+
smoothSnapThreshold: z.value.tooltip.smoothSnapThrehsold,
|
|
2320
|
+
isA11yMode: Jn.value === "keyboard",
|
|
2321
|
+
a11yPosition: qn.value
|
|
2322
|
+
}, {
|
|
2323
|
+
"tooltip-before": A(() => [D(t.$slots, "tooltip-before", S(x({ ...ni.value })), void 0, !0)]),
|
|
2324
|
+
tooltip: A(() => [D(t.$slots, "tooltip", S(x({ ...ni.value })), void 0, !0)]),
|
|
2325
|
+
"tooltip-after": A(() => [D(t.$slots, "tooltip-after", S(x({ ...ni.value })), void 0, !0)]),
|
|
2326
|
+
_: 3
|
|
2327
|
+
}, 8, [
|
|
2328
|
+
"teleportTo",
|
|
2329
|
+
"show",
|
|
2330
|
+
"backgroundColor",
|
|
2331
|
+
"color",
|
|
2332
|
+
"fontSize",
|
|
2333
|
+
"borderRadius",
|
|
2334
|
+
"borderColor",
|
|
2335
|
+
"borderWidth",
|
|
2336
|
+
"backgroundOpacity",
|
|
2337
|
+
"position",
|
|
2338
|
+
"offsetX",
|
|
2339
|
+
"offsetY",
|
|
2340
|
+
"parent",
|
|
2341
|
+
"content",
|
|
2342
|
+
"isCustom",
|
|
2343
|
+
"isFullscreen",
|
|
2344
|
+
"smooth",
|
|
2345
|
+
"backdropFilter",
|
|
2346
|
+
"smoothForce",
|
|
2347
|
+
"smoothSnapThreshold",
|
|
2348
|
+
"isA11yMode",
|
|
2349
|
+
"a11yPosition"
|
|
2350
|
+
]),
|
|
2351
|
+
An.value && I.value.userOptions.buttons.table ? (w(), _(Ye(Oi.value.component), We({ key: 9 }, Oi.value.props, {
|
|
2352
|
+
ref_key: "tableUnit",
|
|
2353
|
+
ref: Wn,
|
|
2354
|
+
onClose: ki
|
|
2355
|
+
}), Be({
|
|
2356
|
+
content: A(() => [(w(), _(k(xn), {
|
|
2357
|
+
key: `table_${Vn.value}`,
|
|
2358
|
+
colNames: pi.value.colNames,
|
|
2359
|
+
head: pi.value.head,
|
|
2360
|
+
body: pi.value.body,
|
|
2361
|
+
config: pi.value.config,
|
|
2362
|
+
title: I.value.table.useDialog ? "" : Oi.value.title,
|
|
2363
|
+
withCloseButton: !I.value.table.useDialog,
|
|
2364
|
+
isCursorPointer: cr.value,
|
|
2365
|
+
onClose: ki
|
|
2366
|
+
}, {
|
|
2367
|
+
th: A(({ th: e }) => [e === "__SUM__" ? (w(), y("div", gn, [He(k(yn), {
|
|
2368
|
+
name: "sigma",
|
|
2369
|
+
stroke: pi.value.config.th.color,
|
|
2370
|
+
size: 16
|
|
2371
|
+
}, null, 8, ["stroke"])])) : (w(), y("div", _n, O(e), 1))]),
|
|
2372
|
+
td: A(({ td: e }) => [Ve(O(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : k(m)(L.value.percentage.formatter, e, k(d)({
|
|
2373
|
+
v: e,
|
|
2374
|
+
s: "%",
|
|
2375
|
+
r: L.value.percentage.rounding
|
|
2376
|
+
})) : k(m)(L.value.value.formatter, e, k(d)({
|
|
2377
|
+
p: L.value.dataLabels.prefix,
|
|
2378
|
+
v: e,
|
|
2379
|
+
s: L.value.dataLabels.suffix,
|
|
2380
|
+
r: L.value.value.rounding
|
|
2381
|
+
}))), 1)]),
|
|
2382
|
+
_: 1
|
|
2383
|
+
}, 8, [
|
|
2384
|
+
"colNames",
|
|
2385
|
+
"head",
|
|
2386
|
+
"body",
|
|
2387
|
+
"config",
|
|
2388
|
+
"title",
|
|
2389
|
+
"withCloseButton",
|
|
2390
|
+
"isCursorPointer"
|
|
2391
|
+
]))]),
|
|
2392
|
+
_: 2
|
|
2393
|
+
}, [I.value.table.useDialog ? {
|
|
2394
|
+
name: "title",
|
|
2395
|
+
fn: A(() => [Ve(O(Oi.value.title), 1)]),
|
|
2396
|
+
key: "0"
|
|
2397
|
+
} : void 0, I.value.table.useDialog ? {
|
|
2398
|
+
name: "actions",
|
|
2399
|
+
fn: A(() => [b("button", {
|
|
2400
|
+
tabindex: "0",
|
|
2401
|
+
class: "vue-ui-user-options-button",
|
|
2402
|
+
onClick: n[4] ||= (e) => fi(I.value.userOptions.callbacks.csv),
|
|
2403
|
+
style: C({ cursor: cr.value ? "pointer" : "default" })
|
|
2404
|
+
}, [He(k(yn), {
|
|
2405
|
+
name: "fileCsv",
|
|
2406
|
+
stroke: Oi.value.props.color
|
|
2407
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2408
|
+
key: "1"
|
|
2409
|
+
} : void 0]), 1040)) : v("", !0),
|
|
2410
|
+
D(t.$slots, "skeleton", {}, () => [k(ur) ? (w(), _(be, { key: 0 })) : v("", !0)], !0)
|
|
2411
|
+
], 46, it));
|
|
2412
|
+
}
|
|
2413
|
+
}, [["__scopeId", "data-v-b07d3e09"]]);
|
|
2414
|
+
//#endregion
|
|
2415
|
+
export { rt as n, vn as t };
|