vue-data-ui 3.4.9 → 3.5.1
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/README.md +114 -37
- package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
- package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
- package/dist/{PackageVersion-CTUqGqWV.js → PackageVersion-DQvyATVa.js} +1 -1
- package/dist/PenAndPaper-SZQIAgkg.js +388 -0
- package/dist/{Title-l36lOBMx.js → Title-isbiM8i8.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-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-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-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +17 -8
- package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-DjGXw6S9.js} +22 -8
- package/dist/{vue-data-ui-DjxWWa78.js → vue-data-ui-B_RxfmEm.js} +113 -107
- package/dist/vue-data-ui.js +64 -64
- package/dist/{vue-ui-3d-bar-CLE7f9pl.js → vue-ui-3d-bar-CMNYyVa2.js} +454 -434
- package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-CqhVCfc2.js} +1 -1
- package/dist/{vue-ui-age-pyramid-D73uIOPm.js → vue-ui-age-pyramid-Vqa9iYXE.js} +180 -160
- package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-nNv10fBm.js} +3 -3
- package/dist/{vue-ui-bullet-Bybo0xK2.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
- package/dist/{vue-ui-candlestick-D_FyMdqH.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
- package/dist/{vue-ui-carousel-table-BvMlNdVo.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
- package/dist/{vue-ui-chestnut-DA0g0bDV.js → vue-ui-chestnut-BGz1TLXG.js} +375 -355
- package/dist/vue-ui-chord-CebhS7ln.js +1153 -0
- package/dist/{vue-ui-circle-pack-BPDm-ro5.js → vue-ui-circle-pack-7PJVyKjp.js} +289 -269
- package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-qYLAwvzn.js} +1 -1
- package/dist/vue-ui-dashboard-DcmMvhgM.js +432 -0
- package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-DyE8eU1m.js} +1 -1
- package/dist/vue-ui-donut-CxZcJFTo.js +1681 -0
- package/dist/{vue-ui-donut-evolution-Ca3Svr0B.js → vue-ui-donut-evolution-BVYL-BUJ.js} +480 -444
- package/dist/{vue-ui-dumbbell-CxCE2luV.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
- package/dist/{vue-ui-flow-DEvwXd4W.js → vue-ui-flow-DEI5LRch.js} +339 -319
- package/dist/{vue-ui-funnel-Bgcx7xia.js → vue-ui-funnel-B_A5orFg.js} +218 -198
- package/dist/{vue-ui-galaxy-BWr1EMob.js → vue-ui-galaxy-CUoDRr-O.js} +313 -277
- package/dist/{vue-ui-gauge-DQricvo2.js → vue-ui-gauge-46tSRZN5.js} +311 -291
- package/dist/{vue-ui-gizmo-C-fKe3io.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
- package/dist/{vue-ui-heatmap-B-o_i7Hu.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
- package/dist/{vue-ui-history-plot-DzQ9DPUJ.js → vue-ui-history-plot-C6p_aThr.js} +478 -442
- package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-B1yJ83aF.js} +2 -2
- package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-BudcNBg-.js} +1 -1
- package/dist/{vue-ui-molecule-I2OhrCR2.js → vue-ui-molecule-L90GnHee.js} +156 -136
- package/dist/{vue-ui-mood-radar-BAT7kZUy.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
- package/dist/{vue-ui-nested-donuts-CjhJDAQi.js → vue-ui-nested-donuts-D0MCLs5n.js} +597 -557
- package/dist/vue-ui-onion-B7yPJ3gL.js +915 -0
- package/dist/vue-ui-parallel-coordinate-plot-DY21ivNe.js +1051 -0
- package/dist/{vue-ui-quadrant-DGnasrCR.js → vue-ui-quadrant-b0vMRaq-.js} +532 -495
- package/dist/{vue-ui-quick-chart-Cam_sWet.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
- package/dist/{vue-ui-radar-DNI9WI2R.js → vue-ui-radar-B5Vkoz9M.js} +412 -373
- package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
- package/dist/{vue-ui-relation-circle-Dj1jhcsl.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
- package/dist/{vue-ui-ridgeline-adIls6bj.js → vue-ui-ridgeline-CAMNq-p_.js} +517 -481
- package/dist/vue-ui-rings-ImGOqm_J.js +855 -0
- package/dist/vue-ui-scatter-CterNJYe.js +1590 -0
- package/dist/{vue-ui-skeleton-DUdI2uOO.js → vue-ui-skeleton-CykXHWj-.js} +2 -2
- package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-DnGm6qrK.js} +1 -1
- package/dist/{vue-ui-spark-trend-DxpRfUJz.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
- package/dist/{vue-ui-sparkbar-B44oER5n.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
- package/dist/{vue-ui-sparkgauge-ix12NZ7M.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Cs-QDYBR.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
- package/dist/{vue-ui-sparkline-Cb8ZmyUq.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
- package/dist/vue-ui-sparkstackbar-BXNy6nuw.js +441 -0
- package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
- package/dist/{vue-ui-strip-plot-BjG-Jxnb.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
- package/dist/{vue-ui-table-DdBdLrAL.js → vue-ui-table-DSsIrT4L.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-DXFHy7-E.js} +1 -1
- package/dist/{vue-ui-table-sparkline-EpCo2Be5.js → vue-ui-table-sparkline-DpqY_4ay.js} +2 -2
- package/dist/vue-ui-thermometer-CMKvSA8p.js +584 -0
- package/dist/{vue-ui-timer-Br3wp8hG.js → vue-ui-timer-BpdCY_wg.js} +3 -3
- package/dist/vue-ui-tiremarks-CNipzVli.js +450 -0
- package/dist/vue-ui-treemap-DPE8SY0_.js +1330 -0
- package/dist/{vue-ui-vertical-bar-yfbEfLqy.js → vue-ui-vertical-bar-ZU1GCbX0.js} +484 -448
- package/dist/{vue-ui-waffle-m-9sqQik.js → vue-ui-waffle-z7nuSuSV.js} +398 -362
- package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
- package/dist/{vue-ui-word-cloud-vNwswYZD.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
- package/dist/{vue-ui-world-BsCNyZy_.js → vue-ui-world-goXYnTyM.js} +287 -267
- package/dist/{vue-ui-xy-CIrw1lWQ.js → vue-ui-xy-NDDbNbds.js} +1263 -1227
- package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-2a6NlQe3.js} +338 -322
- package/package.json +4 -4
- package/dist/PenAndPaper-DSvu9dwa.js +0 -373
- package/dist/vue-ui-chord-CDgzolI-.js +0 -1133
- package/dist/vue-ui-dashboard-CeJwbiON.js +0 -412
- package/dist/vue-ui-donut-DjQXHBJE.js +0 -1645
- package/dist/vue-ui-onion-DTY2p87s.js +0 -873
- package/dist/vue-ui-parallel-coordinate-plot-C8aWTcNn.js +0 -1014
- package/dist/vue-ui-rings-CnTMFK6R.js +0 -813
- package/dist/vue-ui-scatter-fzR2c0St.js +0 -1554
- package/dist/vue-ui-sparkstackbar-BiRZ51OU.js +0 -424
- package/dist/vue-ui-stackbar-DubS6Pg8.js +0 -1708
- package/dist/vue-ui-thermometer-DTnfnf9z.js +0 -564
- package/dist/vue-ui-tiremarks-CrC_tlIx.js +0 -430
- package/dist/vue-ui-treemap-kyuyi2ES.js +0 -1294
- package/dist/vue-ui-wheel-BasM7FWt.js +0 -643
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
import { defineAsyncComponent as F, useSlots as _t, ref as r, computed as h, toRefs as xt, watch as q, shallowRef as Ue, onMounted as Ot, onBeforeUnmount as At, createElementBlock as f, openBlock as i, unref as n, normalizeStyle as R, normalizeClass as G, createBlock as I, createCommentVNode as b, createElementVNode as C, createVNode as Q, withCtx as v, renderSlot as c, normalizeProps as $, guardReactiveProps as T, createSlots as ie, Fragment as ve, renderList as ce, mergeProps as ze, Teleport as Ft, toDisplayString as de, resolveDynamicComponent as It, createTextVNode as Ee, nextTick as Pt } from "vue";
|
|
2
|
+
import { c as We, t as Lt, b as Nt, p as V, o as Ge, f as he, g as Dt, e as Rt, a1 as Vt, h as He, a as je, d as B, X as Bt, s as Mt, i as Ut, x as J, P as zt, Q as Et, G as Wt, H as Gt } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { t as Ht, u as jt } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Xt, a as Xe } from "./useNestedProp-DjGXw6S9.js";
|
|
5
|
+
import { u as Yt } from "./usePrinter-DTzqpYKF.js";
|
|
6
|
+
import { u as qt, B as Qt } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as Jt } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as Kt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as Zt } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import el from "./img-BecE5qXd.js";
|
|
11
|
+
import { _ as tl } from "./Shape-CNXKB8O0.js";
|
|
12
|
+
import ll from "./Title-isbiM8i8.js";
|
|
13
|
+
import { t as ol } from "./themes-AUNCOb2G.js";
|
|
14
|
+
import al from "./Legend-G6GMcdAc.js";
|
|
15
|
+
import { _ as nl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const sl = ["id"], ul = ["id"], rl = ["xmlns", "viewBox"], il = ["width", "height"], vl = ["id"], cl = ["stop-color"], dl = ["stop-color"], hl = { key: 1 }, pl = ["stroke", "cx", "cy", "r", "fill"], gl = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], fl = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], yl = ["cx", "cy", "r", "onMouseenter", "onMouseleave", "onClick"], ml = {
|
|
17
|
+
key: 4,
|
|
18
|
+
class: "vue-data-ui-watermark"
|
|
19
|
+
}, bl = ["id"], kl = ["onClick"], wl = ["innerHTML"], Cl = {
|
|
20
|
+
__name: "vue-ui-rings",
|
|
21
|
+
props: {
|
|
22
|
+
config: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default() {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
dataset: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default() {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["selectLegend"],
|
|
36
|
+
setup(Ye, { expose: qe, emit: Qe }) {
|
|
37
|
+
const Je = F(() => import("./Tooltip-oWCO1HKy.js")), Ke = F(() => import("./BaseIcon-BmMbm4d0.js")), Ze = F(() => import("./vue-ui-accordion-CqhVCfc2.js")), et = F(() => import("./DataTable-BT7VF2ua.js")), tt = F(() => import("./PenAndPaper-SZQIAgkg.js")), lt = F(() => import("./UserOptions-CGnQt6Fd.js")), ot = F(() => import("./PackageVersion-DQvyATVa.js")), at = F(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_rings: nt } = Xt(), st = _t(), k = Ye, P = r(!1), pe = h(() => !!k.dataset && k.dataset.length), m = r(We()), H = r(!1), K = r(""), _ = r(null), ge = r(0), x = r(null), fe = r(null), ye = r(null), me = r(null), be = r(null), ke = r(0), we = r(0), Ce = r(0), Z = r(!1), $e = r(!1), U = r(null), ee = r(null), e = r(oe()), { loading: L, FINAL_DATASET: Te, manualLoading: j } = qt({
|
|
38
|
+
...xt(k),
|
|
39
|
+
FINAL_CONFIG: e,
|
|
40
|
+
prepareConfig: oe,
|
|
41
|
+
skeletonDataset: [
|
|
42
|
+
{ name: "_", values: [13], color: "#808080" },
|
|
43
|
+
{ name: "_", values: [8], color: "#969696" },
|
|
44
|
+
{ name: "_", values: [5], color: "#ADADAD" },
|
|
45
|
+
{ name: "_", values: [3], color: "#C4C4C4" },
|
|
46
|
+
{ name: "_", values: [2], color: "#DBDBDB" }
|
|
47
|
+
],
|
|
48
|
+
skeletonConfig: Lt({
|
|
49
|
+
defaultConfig: e.value,
|
|
50
|
+
userConfig: {
|
|
51
|
+
userOptions: { show: !1 },
|
|
52
|
+
table: { show: !1 },
|
|
53
|
+
style: {
|
|
54
|
+
chart: {
|
|
55
|
+
backgroundColor: "#99999930",
|
|
56
|
+
layout: {
|
|
57
|
+
rings: {
|
|
58
|
+
stroke: "#6A6A6A",
|
|
59
|
+
gradient: {
|
|
60
|
+
underlayerColor: "#FFFFFF"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
legend: {
|
|
65
|
+
backgroundColor: "transparent"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
}), { userOptionsVisible: te, setUserOptionsVisibility: Se, keepUserOptionState: _e } = Kt({ config: e.value }), { svgRef: le } = Zt({ config: e.value.style.chart.title });
|
|
72
|
+
function oe() {
|
|
73
|
+
const t = Xe({
|
|
74
|
+
userConfig: k.config,
|
|
75
|
+
defaultConfig: nt
|
|
76
|
+
});
|
|
77
|
+
return t.theme ? {
|
|
78
|
+
...Xe({
|
|
79
|
+
userConfig: ol.vue_ui_rings[t.theme] || k.config,
|
|
80
|
+
defaultConfig: t
|
|
81
|
+
}),
|
|
82
|
+
customPalette: Nt[t.theme] || V
|
|
83
|
+
} : t;
|
|
84
|
+
}
|
|
85
|
+
q(() => k.config, (t) => {
|
|
86
|
+
L.value || (e.value = oe()), te.value = !e.value.userOptions.showOnChartHover, xe(), ke.value += 1, we.value += 1, Ce.value += 1, w.value.showTable = e.value.table.show, w.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
87
|
+
}, { deep: !0 }), q(() => k.dataset, (t) => {
|
|
88
|
+
Array.isArray(t) && t.length > 0 && (j.value = !1);
|
|
89
|
+
}, { deep: !0 });
|
|
90
|
+
const O = Ue(null), M = Ue(null);
|
|
91
|
+
Ot(() => {
|
|
92
|
+
$e.value = !0, xe();
|
|
93
|
+
});
|
|
94
|
+
const ae = h(() => !!e.value.debug);
|
|
95
|
+
function xe() {
|
|
96
|
+
if (Ge(k.dataset) ? (he({
|
|
97
|
+
componentName: "VueUiRings",
|
|
98
|
+
type: "dataset",
|
|
99
|
+
debug: ae.value
|
|
100
|
+
}), j.value = !0) : k.dataset.forEach((t, o) => {
|
|
101
|
+
t.values.length || (he({
|
|
102
|
+
componentName: "VueUiRings",
|
|
103
|
+
type: "dataset",
|
|
104
|
+
debug: ae.value
|
|
105
|
+
}), j.value = !0), Dt({
|
|
106
|
+
datasetObject: t,
|
|
107
|
+
requiredAttributes: ["name", "values"]
|
|
108
|
+
}).forEach((l) => {
|
|
109
|
+
he({
|
|
110
|
+
componentName: "VueUiRings",
|
|
111
|
+
type: "datasetSerieAttribute",
|
|
112
|
+
property: l,
|
|
113
|
+
index: o,
|
|
114
|
+
debug: ae.value
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}), Ge(k.dataset) || (j.value = e.value.loading), e.value.responsive) {
|
|
118
|
+
const t = Ht(() => {
|
|
119
|
+
Z.value = !0;
|
|
120
|
+
const { width: o, height: l } = jt({
|
|
121
|
+
chart: x.value,
|
|
122
|
+
title: e.value.style.chart.title.text ? fe.value : null,
|
|
123
|
+
legend: e.value.style.chart.legend.show ? ye.value : null,
|
|
124
|
+
source: me.value,
|
|
125
|
+
noTitle: be.value
|
|
126
|
+
});
|
|
127
|
+
requestAnimationFrame(() => {
|
|
128
|
+
u.value.width = o, u.value.height = l - 12, Z.value = !1;
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
O.value && (M.value && O.value.unobserve(M.value), O.value.disconnect()), O.value = new ResizeObserver(t), M.value = x.value.parentNode, O.value.observe(M.value);
|
|
132
|
+
}
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
P.value = !0;
|
|
135
|
+
}, 600);
|
|
136
|
+
}
|
|
137
|
+
At(() => {
|
|
138
|
+
O.value && (M.value && O.value.unobserve(M.value), O.value.disconnect());
|
|
139
|
+
});
|
|
140
|
+
const { isPrinting: Oe, isImaging: Ae, generatePdf: Fe, generateImage: Ie } = Yt({
|
|
141
|
+
elementId: `rings_${m.value}`,
|
|
142
|
+
fileName: e.value.style.chart.title.text || "vue-ui-rings",
|
|
143
|
+
options: e.value.userOptions.print
|
|
144
|
+
}), ut = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), Pe = h(() => Rt(e.value.customPalette)), w = r({
|
|
145
|
+
showTable: e.value.table.show,
|
|
146
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
147
|
+
});
|
|
148
|
+
q(e, () => {
|
|
149
|
+
w.value = {
|
|
150
|
+
showTable: e.value.table.show,
|
|
151
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
152
|
+
};
|
|
153
|
+
}, { immediate: !0 });
|
|
154
|
+
const u = r({
|
|
155
|
+
height: 360,
|
|
156
|
+
width: 360
|
|
157
|
+
}), rt = h(() => Math.min(u.value.height, u.value.width)), it = Qe, p = r([]);
|
|
158
|
+
function z(t) {
|
|
159
|
+
if (p.value.includes(t))
|
|
160
|
+
p.value = p.value.filter((o) => o !== t);
|
|
161
|
+
else {
|
|
162
|
+
if (p.value.length === N.value.length - 1) return;
|
|
163
|
+
p.value.push(t);
|
|
164
|
+
}
|
|
165
|
+
it("selectLegend", y.value.map((o) => ({
|
|
166
|
+
name: o.name,
|
|
167
|
+
color: o.color,
|
|
168
|
+
value: o.value
|
|
169
|
+
})));
|
|
170
|
+
}
|
|
171
|
+
function Le(t) {
|
|
172
|
+
if (!N.value.length)
|
|
173
|
+
return e.value.debug && console.warn("VueUiRings - There are no series to show."), null;
|
|
174
|
+
const o = N.value.find((l) => l.name === t);
|
|
175
|
+
return o || (e.value.debug && console.warn(`VueUiRings - Series name not found "${t}"`), null);
|
|
176
|
+
}
|
|
177
|
+
function vt(t) {
|
|
178
|
+
const o = Le(t);
|
|
179
|
+
o !== null && p.value.includes(o.uid) && z(o.uid);
|
|
180
|
+
}
|
|
181
|
+
function ct(t) {
|
|
182
|
+
const o = Le(t);
|
|
183
|
+
o !== null && (p.value.includes(o.uid) || z(o.uid));
|
|
184
|
+
}
|
|
185
|
+
const dt = h(() => Math.max(
|
|
186
|
+
...N.value.filter((t) => !p.value.includes(t.uid)).map(({ value: t }) => t)
|
|
187
|
+
));
|
|
188
|
+
function Ne(t) {
|
|
189
|
+
return t / dt.value;
|
|
190
|
+
}
|
|
191
|
+
const N = h(() => Te.value.map(({ values: t, name: o, color: l = null }, a) => {
|
|
192
|
+
const s = Vt(t).reduce((d, W) => d + W, 0);
|
|
193
|
+
return {
|
|
194
|
+
name: o,
|
|
195
|
+
color: l || He(l) || Pe.value[a] || V[a] || V[a % V.length],
|
|
196
|
+
value: s,
|
|
197
|
+
proportion: s / Te.value.map((d) => (d.values || []).reduce((W, St) => W + St, 0)).reduce((d, W) => d + W, 0),
|
|
198
|
+
uid: We(),
|
|
199
|
+
absoluteIndex: a
|
|
200
|
+
};
|
|
201
|
+
})), ne = h(() => N.value.map((t, o) => ({
|
|
202
|
+
...t,
|
|
203
|
+
shape: "circle",
|
|
204
|
+
opacity: p.value.includes(t.uid) ? 0.5 : 1,
|
|
205
|
+
segregate: () => z(t.uid),
|
|
206
|
+
isSegregated: p.value.includes(t.uid),
|
|
207
|
+
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? je(e.value.style.chart.layout.labels.dataLabels.formatter, t.value, B({
|
|
208
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
209
|
+
v: t.value,
|
|
210
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
211
|
+
r: e.value.style.chart.legend.roundingValue
|
|
212
|
+
}), { datapoint: t, index: o }) : ""}${e.value.style.chart.legend.showPercentage ? p.value.includes(t.uid) ? `${e.value.style.chart.legend.showValue ? " (" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(t.value / S.value) ? "-" : B({ v: t.value / S.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
213
|
+
})).toSorted((t, o) => o.value - t.value)), ht = h(() => ({
|
|
214
|
+
cy: "rings-div-legend",
|
|
215
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
216
|
+
color: e.value.style.chart.legend.color,
|
|
217
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
218
|
+
paddingBottom: 12,
|
|
219
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
220
|
+
})), S = h(() => N.value.filter((t) => !p.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), y = h(() => N.value.filter((t) => !p.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a, absoluteIndex: s }, d) => ({
|
|
221
|
+
absoluteIndex: s,
|
|
222
|
+
uid: a,
|
|
223
|
+
name: t,
|
|
224
|
+
color: l || He(l) || Pe.value[d] || V[d] || V[d % V.length],
|
|
225
|
+
value: o,
|
|
226
|
+
proportion: Ne(o),
|
|
227
|
+
percentage: o / S.value * 100,
|
|
228
|
+
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * Ne(o)
|
|
229
|
+
})).toSorted((t, o) => o.value - t.value));
|
|
230
|
+
function pt() {
|
|
231
|
+
return y.value.map(
|
|
232
|
+
({ name: t, color: o, value: l, absoluteValues: a, percentage: s }) => ({
|
|
233
|
+
name: t,
|
|
234
|
+
color: o,
|
|
235
|
+
value: l,
|
|
236
|
+
absoluteValues: a,
|
|
237
|
+
percentage: s
|
|
238
|
+
})
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
const g = h(() => rt.value - e.value.style.chart.layout.rings.strokeWidth * 2);
|
|
242
|
+
function gt(t, o) {
|
|
243
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
|
|
244
|
+
}
|
|
245
|
+
function ft(t, o) {
|
|
246
|
+
_.value = null, H.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
|
|
247
|
+
}
|
|
248
|
+
const se = r(null);
|
|
249
|
+
function yt(t, o) {
|
|
250
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o }), p.value.length === k.dataset.length) return;
|
|
251
|
+
se.value = {
|
|
252
|
+
datapoint: t,
|
|
253
|
+
seriesIndex: o,
|
|
254
|
+
series: y.value,
|
|
255
|
+
config: e.value
|
|
256
|
+
}, _.value = o;
|
|
257
|
+
const l = y.value[o], a = e.value.style.chart.tooltip.customFormat;
|
|
258
|
+
if (Wt(a) && Gt(() => a({
|
|
259
|
+
seriesIndex: o,
|
|
260
|
+
datapoint: t,
|
|
261
|
+
series: y.value,
|
|
262
|
+
config: e.value
|
|
263
|
+
})))
|
|
264
|
+
K.value = a({
|
|
265
|
+
seriesIndex: o,
|
|
266
|
+
datapoint: t,
|
|
267
|
+
series: y.value,
|
|
268
|
+
config: e.value
|
|
269
|
+
});
|
|
270
|
+
else {
|
|
271
|
+
let s = "";
|
|
272
|
+
s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<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="${l.color}" />${st.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${m.value}_${t.absoluteIndex})" />` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${je(
|
|
273
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
274
|
+
l.value,
|
|
275
|
+
B({
|
|
276
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
277
|
+
v: l.value,
|
|
278
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
279
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
280
|
+
}),
|
|
281
|
+
{ datapoint: t, seriesIndex: o }
|
|
282
|
+
)}
|
|
283
|
+
</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? s += `<span>(${B({
|
|
284
|
+
v: l.value / S.value * 100,
|
|
285
|
+
s: "%",
|
|
286
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
287
|
+
})})</span></div>` : s += `<b>${B({
|
|
288
|
+
v: l.value / S.value * 100,
|
|
289
|
+
s: "%",
|
|
290
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
291
|
+
})}</b></div>`), K.value = s;
|
|
292
|
+
}
|
|
293
|
+
H.value = !0;
|
|
294
|
+
}
|
|
295
|
+
const A = h(() => {
|
|
296
|
+
const t = y.value.map((l) => ({
|
|
297
|
+
name: l.name,
|
|
298
|
+
color: l.color
|
|
299
|
+
})), o = y.value.map((l) => l.value);
|
|
300
|
+
return { head: t, body: o };
|
|
301
|
+
}), X = h(() => {
|
|
302
|
+
const t = [
|
|
303
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
304
|
+
B({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: S.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
305
|
+
"100%"
|
|
306
|
+
], o = A.value.head.map((s, d) => [
|
|
307
|
+
{
|
|
308
|
+
color: s.color,
|
|
309
|
+
name: s.name
|
|
310
|
+
},
|
|
311
|
+
B({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: A.value.body[d], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
312
|
+
isNaN(A.value.body[d] / S.value) ? "-" : (A.value.body[d] / S.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
313
|
+
]), l = {
|
|
314
|
+
th: {
|
|
315
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
316
|
+
color: e.value.table.th.color,
|
|
317
|
+
outline: e.value.table.th.outline
|
|
318
|
+
},
|
|
319
|
+
td: {
|
|
320
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
321
|
+
color: e.value.table.td.color,
|
|
322
|
+
outline: e.value.table.td.outline
|
|
323
|
+
},
|
|
324
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
325
|
+
}, a = [
|
|
326
|
+
e.value.table.columnNames.series,
|
|
327
|
+
e.value.table.columnNames.value,
|
|
328
|
+
e.value.table.columnNames.percentage
|
|
329
|
+
];
|
|
330
|
+
return {
|
|
331
|
+
head: t,
|
|
332
|
+
body: o,
|
|
333
|
+
config: l,
|
|
334
|
+
colNames: a
|
|
335
|
+
};
|
|
336
|
+
});
|
|
337
|
+
function ue(t = null) {
|
|
338
|
+
Pt(() => {
|
|
339
|
+
const o = A.value.head.map((s, d) => [[
|
|
340
|
+
s.name
|
|
341
|
+
], [A.value.body[d]], [isNaN(A.value.body[d] / S.value) ? "-" : A.value.body[d] / S.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = zt(l);
|
|
342
|
+
t ? t(a) : Et({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
const D = r(!1);
|
|
346
|
+
function De(t) {
|
|
347
|
+
D.value = t, ge.value += 1;
|
|
348
|
+
}
|
|
349
|
+
function Re() {
|
|
350
|
+
w.value.showTable = !w.value.showTable;
|
|
351
|
+
}
|
|
352
|
+
function Ve() {
|
|
353
|
+
w.value.showTooltip = !w.value.showTooltip;
|
|
354
|
+
}
|
|
355
|
+
const Y = r(!1);
|
|
356
|
+
function re() {
|
|
357
|
+
Y.value = !Y.value;
|
|
358
|
+
}
|
|
359
|
+
async function mt({ scale: t = 2 } = {}) {
|
|
360
|
+
if (!x.value) return;
|
|
361
|
+
const { width: o, height: l } = x.value.getBoundingClientRect(), a = o / l, { imageUri: s, base64: d } = await el({ domElement: x.value, base64: !0, img: !0, scale: t });
|
|
362
|
+
return {
|
|
363
|
+
imageUri: s,
|
|
364
|
+
base64: d,
|
|
365
|
+
title: e.value.style.chart.title.text,
|
|
366
|
+
width: o,
|
|
367
|
+
height: l,
|
|
368
|
+
aspectRatio: a
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
const E = h(() => {
|
|
372
|
+
const t = e.value.table.useDialog && !e.value.table.show, o = w.value.showTable;
|
|
373
|
+
return {
|
|
374
|
+
component: t ? at : Ze,
|
|
375
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
376
|
+
props: t ? {
|
|
377
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
378
|
+
color: e.value.table.th.color,
|
|
379
|
+
headerColor: e.value.table.th.color,
|
|
380
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
381
|
+
isFullscreen: D.value,
|
|
382
|
+
fullscreenParent: x.value,
|
|
383
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
384
|
+
} : {
|
|
385
|
+
hideDetails: !0,
|
|
386
|
+
config: {
|
|
387
|
+
open: o,
|
|
388
|
+
maxHeight: 1e4,
|
|
389
|
+
body: {
|
|
390
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
391
|
+
color: e.value.style.chart.color
|
|
392
|
+
},
|
|
393
|
+
head: {
|
|
394
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
395
|
+
color: e.value.style.chart.color
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
});
|
|
401
|
+
q(() => w.value.showTable, (t) => {
|
|
402
|
+
e.value.table.show || (t && e.value.table.useDialog && U.value ? U.value.open() : "close" in U.value && U.value.close());
|
|
403
|
+
});
|
|
404
|
+
function Be() {
|
|
405
|
+
w.value.showTable = !1, ee.value && ee.value.setTableIconState(!1);
|
|
406
|
+
}
|
|
407
|
+
const bt = h(() => ne.value.map((t) => ({
|
|
408
|
+
...t,
|
|
409
|
+
name: t.display
|
|
410
|
+
}))), kt = h(() => e.value.style.chart.backgroundColor), wt = h(() => e.value.style.chart.legend), Ct = h(() => e.value.style.chart.title), { exportSvg: $t, getSvg: Tt } = Jt({
|
|
411
|
+
svg: le,
|
|
412
|
+
title: Ct,
|
|
413
|
+
legend: wt,
|
|
414
|
+
legendItems: bt,
|
|
415
|
+
backgroundColor: kt
|
|
416
|
+
});
|
|
417
|
+
async function Me({ isCb: t }) {
|
|
418
|
+
if (t) {
|
|
419
|
+
const { blob: o, url: l, text: a, dataUrl: s } = await Tt();
|
|
420
|
+
e.value.userOptions.callbacks.svg({ blob: o, url: l, text: a, dataUrl: s });
|
|
421
|
+
} else
|
|
422
|
+
$t();
|
|
423
|
+
}
|
|
424
|
+
return qe({
|
|
425
|
+
getData: pt,
|
|
426
|
+
getImage: mt,
|
|
427
|
+
generatePdf: Fe,
|
|
428
|
+
generateCsv: ue,
|
|
429
|
+
generateImage: Ie,
|
|
430
|
+
generateSvg: Me,
|
|
431
|
+
hideSeries: ct,
|
|
432
|
+
showSeries: vt,
|
|
433
|
+
toggleTable: Re,
|
|
434
|
+
toggleTooltip: Ve,
|
|
435
|
+
toggleAnnotator: re,
|
|
436
|
+
toggleFullscreen: De
|
|
437
|
+
}), (t, o) => (i(), f("div", {
|
|
438
|
+
ref_key: "ringsChart",
|
|
439
|
+
ref: x,
|
|
440
|
+
class: G(`vue-data-ui-component vue-ui-rings ${D.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
441
|
+
style: R(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
442
|
+
id: `rings_${m.value}`,
|
|
443
|
+
onMouseleave: o[2] || (o[2] = (l) => {
|
|
444
|
+
_.value = null, H.value = !1, n(Se)(!1);
|
|
445
|
+
}),
|
|
446
|
+
onMouseenter: o[3] || (o[3] = () => n(Se)(!0))
|
|
447
|
+
}, [
|
|
448
|
+
e.value.userOptions.buttons.annotator ? (i(), I(n(tt), {
|
|
449
|
+
key: 0,
|
|
450
|
+
svgRef: n(le),
|
|
451
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
452
|
+
color: e.value.style.chart.color,
|
|
453
|
+
active: Y.value,
|
|
454
|
+
onClose: re
|
|
455
|
+
}, {
|
|
456
|
+
"annotator-action-close": v(() => [
|
|
457
|
+
c(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
458
|
+
]),
|
|
459
|
+
"annotator-action-color": v(({ color: l }) => [
|
|
460
|
+
c(t.$slots, "annotator-action-color", $(T({ color: l })), void 0, !0)
|
|
461
|
+
]),
|
|
462
|
+
"annotator-action-draw": v(({ mode: l }) => [
|
|
463
|
+
c(t.$slots, "annotator-action-draw", $(T({ mode: l })), void 0, !0)
|
|
464
|
+
]),
|
|
465
|
+
"annotator-action-undo": v(({ disabled: l }) => [
|
|
466
|
+
c(t.$slots, "annotator-action-undo", $(T({ disabled: l })), void 0, !0)
|
|
467
|
+
]),
|
|
468
|
+
"annotator-action-redo": v(({ disabled: l }) => [
|
|
469
|
+
c(t.$slots, "annotator-action-redo", $(T({ disabled: l })), void 0, !0)
|
|
470
|
+
]),
|
|
471
|
+
"annotator-action-delete": v(({ disabled: l }) => [
|
|
472
|
+
c(t.$slots, "annotator-action-delete", $(T({ disabled: l })), void 0, !0)
|
|
473
|
+
]),
|
|
474
|
+
_: 3
|
|
475
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
|
|
476
|
+
ut.value ? (i(), f("div", {
|
|
477
|
+
key: 1,
|
|
478
|
+
ref_key: "noTitle",
|
|
479
|
+
ref: be,
|
|
480
|
+
class: "vue-data-ui-no-title-space",
|
|
481
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
482
|
+
}, null, 512)) : b("", !0),
|
|
483
|
+
e.value.style.chart.title.text ? (i(), f("div", {
|
|
484
|
+
key: 2,
|
|
485
|
+
ref_key: "chartTitle",
|
|
486
|
+
ref: fe,
|
|
487
|
+
style: "width:100%;background:transparent"
|
|
488
|
+
}, [
|
|
489
|
+
(i(), I(ll, {
|
|
490
|
+
key: `title_${ke.value}`,
|
|
491
|
+
config: {
|
|
492
|
+
title: {
|
|
493
|
+
cy: "rings-div-title",
|
|
494
|
+
...e.value.style.chart.title
|
|
495
|
+
},
|
|
496
|
+
subtitle: {
|
|
497
|
+
cy: "rings-div-subtitle",
|
|
498
|
+
...e.value.style.chart.title.subtitle
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}, null, 8, ["config"]))
|
|
502
|
+
], 512)) : b("", !0),
|
|
503
|
+
C("div", {
|
|
504
|
+
id: `legend-top-${m.value}`
|
|
505
|
+
}, null, 8, ul),
|
|
506
|
+
e.value.userOptions.show && pe.value && (n(_e) || n(te)) ? (i(), I(n(lt), {
|
|
507
|
+
ref_key: "userOptionsRef",
|
|
508
|
+
ref: ee,
|
|
509
|
+
key: `user_options_${ge.value}`,
|
|
510
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
511
|
+
color: e.value.style.chart.color,
|
|
512
|
+
isPrinting: n(Oe),
|
|
513
|
+
isImaging: n(Ae),
|
|
514
|
+
uid: m.value,
|
|
515
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
516
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
517
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
518
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
519
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
520
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
521
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
522
|
+
isTooltip: w.value.showTooltip,
|
|
523
|
+
isFullscreen: D.value,
|
|
524
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
525
|
+
chartElement: x.value,
|
|
526
|
+
position: e.value.userOptions.position,
|
|
527
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
528
|
+
isAnnotation: Y.value,
|
|
529
|
+
callbacks: e.value.userOptions.callbacks,
|
|
530
|
+
printScale: e.value.userOptions.print.scale,
|
|
531
|
+
tableDialog: e.value.table.useDialog,
|
|
532
|
+
onToggleFullscreen: De,
|
|
533
|
+
onGeneratePdf: n(Fe),
|
|
534
|
+
onGenerateCsv: ue,
|
|
535
|
+
onGenerateImage: n(Ie),
|
|
536
|
+
onGenerateSvg: Me,
|
|
537
|
+
onToggleTable: Re,
|
|
538
|
+
onToggleTooltip: Ve,
|
|
539
|
+
onToggleAnnotator: re,
|
|
540
|
+
style: R({
|
|
541
|
+
visibility: n(_e) ? n(te) ? "visible" : "hidden" : "visible"
|
|
542
|
+
})
|
|
543
|
+
}, ie({ _: 2 }, [
|
|
544
|
+
t.$slots.menuIcon ? {
|
|
545
|
+
name: "menuIcon",
|
|
546
|
+
fn: v(({ isOpen: l, color: a }) => [
|
|
547
|
+
c(t.$slots, "menuIcon", $(T({ isOpen: l, color: a })), void 0, !0)
|
|
548
|
+
]),
|
|
549
|
+
key: "0"
|
|
550
|
+
} : void 0,
|
|
551
|
+
t.$slots.optionTooltip ? {
|
|
552
|
+
name: "optionTooltip",
|
|
553
|
+
fn: v(() => [
|
|
554
|
+
c(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
555
|
+
]),
|
|
556
|
+
key: "1"
|
|
557
|
+
} : void 0,
|
|
558
|
+
t.$slots.optionPdf ? {
|
|
559
|
+
name: "optionPdf",
|
|
560
|
+
fn: v(() => [
|
|
561
|
+
c(t.$slots, "optionPdf", {}, void 0, !0)
|
|
562
|
+
]),
|
|
563
|
+
key: "2"
|
|
564
|
+
} : void 0,
|
|
565
|
+
t.$slots.optionCsv ? {
|
|
566
|
+
name: "optionCsv",
|
|
567
|
+
fn: v(() => [
|
|
568
|
+
c(t.$slots, "optionCsv", {}, void 0, !0)
|
|
569
|
+
]),
|
|
570
|
+
key: "3"
|
|
571
|
+
} : void 0,
|
|
572
|
+
t.$slots.optionImg ? {
|
|
573
|
+
name: "optionImg",
|
|
574
|
+
fn: v(() => [
|
|
575
|
+
c(t.$slots, "optionImg", {}, void 0, !0)
|
|
576
|
+
]),
|
|
577
|
+
key: "4"
|
|
578
|
+
} : void 0,
|
|
579
|
+
t.$slots.optionSvg ? {
|
|
580
|
+
name: "optionSvg",
|
|
581
|
+
fn: v(() => [
|
|
582
|
+
c(t.$slots, "optionSvg", {}, void 0, !0)
|
|
583
|
+
]),
|
|
584
|
+
key: "5"
|
|
585
|
+
} : void 0,
|
|
586
|
+
t.$slots.optionTable ? {
|
|
587
|
+
name: "optionTable",
|
|
588
|
+
fn: v(() => [
|
|
589
|
+
c(t.$slots, "optionTable", {}, void 0, !0)
|
|
590
|
+
]),
|
|
591
|
+
key: "6"
|
|
592
|
+
} : void 0,
|
|
593
|
+
t.$slots.optionFullscreen ? {
|
|
594
|
+
name: "optionFullscreen",
|
|
595
|
+
fn: v(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
596
|
+
c(t.$slots, "optionFullscreen", $(T({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
597
|
+
]),
|
|
598
|
+
key: "7"
|
|
599
|
+
} : void 0,
|
|
600
|
+
t.$slots.optionAnnotator ? {
|
|
601
|
+
name: "optionAnnotator",
|
|
602
|
+
fn: v(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
603
|
+
c(t.$slots, "optionAnnotator", $(T({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
604
|
+
]),
|
|
605
|
+
key: "8"
|
|
606
|
+
} : void 0
|
|
607
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0),
|
|
608
|
+
(i(), f("svg", {
|
|
609
|
+
ref_key: "svgRef",
|
|
610
|
+
ref: le,
|
|
611
|
+
xmlns: n(Bt),
|
|
612
|
+
class: G({ "vue-data-ui-fullscreen--on": D.value, "vue-data-ui-fulscreen--off": !D.value, resizing: Z.value || n(L) }),
|
|
613
|
+
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
614
|
+
style: R(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
615
|
+
}, [
|
|
616
|
+
Q(n(ot)),
|
|
617
|
+
t.$slots["chart-background"] ? (i(), f("foreignObject", {
|
|
618
|
+
key: 0,
|
|
619
|
+
x: 0,
|
|
620
|
+
y: 0,
|
|
621
|
+
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
622
|
+
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
623
|
+
style: {
|
|
624
|
+
pointerEvents: "none"
|
|
625
|
+
}
|
|
626
|
+
}, [
|
|
627
|
+
c(t.$slots, "chart-background", {}, void 0, !0)
|
|
628
|
+
], 8, il)) : b("", !0),
|
|
629
|
+
C("defs", null, [
|
|
630
|
+
(i(!0), f(ve, null, ce(y.value, (l, a) => (i(), f("radialGradient", {
|
|
631
|
+
cx: "50%",
|
|
632
|
+
cy: "30%",
|
|
633
|
+
r: "50%",
|
|
634
|
+
fx: "50%",
|
|
635
|
+
fy: "50%",
|
|
636
|
+
id: `gradient_${m.value}_${a}`
|
|
637
|
+
}, [
|
|
638
|
+
C("stop", {
|
|
639
|
+
offset: "0%",
|
|
640
|
+
"stop-color": n(Mt)(n(Ut)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
641
|
+
}, null, 8, cl),
|
|
642
|
+
C("stop", {
|
|
643
|
+
offset: "100%",
|
|
644
|
+
"stop-color": l.color
|
|
645
|
+
}, null, 8, dl)
|
|
646
|
+
], 8, vl))), 256))
|
|
647
|
+
]),
|
|
648
|
+
t.$slots.pattern ? (i(), f("g", hl, [
|
|
649
|
+
(i(!0), f(ve, null, ce(y.value, (l) => (i(), f("defs", null, [
|
|
650
|
+
c(t.$slots, "pattern", ze({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${m.value}_${l.absoluteIndex}` }), void 0, !0)
|
|
651
|
+
]))), 256))
|
|
652
|
+
])) : b("", !0),
|
|
653
|
+
(i(!0), f(ve, null, ce(y.value, (l, a) => (i(), f("g", null, [
|
|
654
|
+
C("circle", {
|
|
655
|
+
class: G({
|
|
656
|
+
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
657
|
+
"vue-rings-item-onload": !P.value && e.value.useCssAnimation && !n(L),
|
|
658
|
+
"vue-ui-rings-opacity": _.value !== null && _.value !== a
|
|
659
|
+
}),
|
|
660
|
+
style: R(`animation-delay:${a * 100}ms`),
|
|
661
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
662
|
+
cx: u.value.width / 2,
|
|
663
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * y.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
664
|
+
r: n(J)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
665
|
+
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
666
|
+
}, null, 14, pl),
|
|
667
|
+
C("circle", {
|
|
668
|
+
class: G({
|
|
669
|
+
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
670
|
+
"vue-rings-item-onload": !P.value && e.value.useCssAnimation && !n(L),
|
|
671
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
672
|
+
"vue-ui-rings-blur": _.value !== null && _.value !== a
|
|
673
|
+
}),
|
|
674
|
+
style: R(`animation-delay:${a * 100}ms`),
|
|
675
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
676
|
+
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
677
|
+
cx: u.value.width / 2,
|
|
678
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * y.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
679
|
+
r: n(J)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
680
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${m.value}_${a})` : l.color
|
|
681
|
+
}, null, 14, gl),
|
|
682
|
+
t.$slots.pattern ? (i(), f("circle", {
|
|
683
|
+
key: 0,
|
|
684
|
+
class: G({
|
|
685
|
+
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
686
|
+
"vue-rings-item-onload": !P.value && e.value.useCssAnimation && !n(L),
|
|
687
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
688
|
+
"vue-ui-rings-blur": _.value !== null && _.value !== a
|
|
689
|
+
}),
|
|
690
|
+
style: R(`animation-delay:${a * 100}ms`),
|
|
691
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
692
|
+
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
693
|
+
cx: u.value.width / 2,
|
|
694
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * y.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
695
|
+
r: n(J)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
696
|
+
fill: `url(#pattern_${m.value}_${l.absoluteIndex})`
|
|
697
|
+
}, null, 14, fl)) : b("", !0),
|
|
698
|
+
C("circle", {
|
|
699
|
+
stroke: "none",
|
|
700
|
+
cx: u.value.width / 2,
|
|
701
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * y.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
702
|
+
r: n(J)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
703
|
+
fill: "transparent",
|
|
704
|
+
onMouseenter: (s) => yt(l, a),
|
|
705
|
+
onMouseleave: (s) => ft(l, a),
|
|
706
|
+
onClick: (s) => gt(l, a)
|
|
707
|
+
}, null, 40, yl)
|
|
708
|
+
]))), 256)),
|
|
709
|
+
c(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
710
|
+
], 14, rl)),
|
|
711
|
+
t.$slots.watermark ? (i(), f("div", ml, [
|
|
712
|
+
c(t.$slots, "watermark", $(T({ isPrinting: n(Oe) || n(Ae) })), void 0, !0)
|
|
713
|
+
])) : b("", !0),
|
|
714
|
+
C("div", {
|
|
715
|
+
id: `legend-bottom-${m.value}`
|
|
716
|
+
}, null, 8, bl),
|
|
717
|
+
$e.value ? (i(), I(Ft, {
|
|
718
|
+
key: 5,
|
|
719
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${m.value}` : `#legend-bottom-${m.value}`
|
|
720
|
+
}, [
|
|
721
|
+
C("div", {
|
|
722
|
+
ref_key: "chartLegend",
|
|
723
|
+
ref: ye
|
|
724
|
+
}, [
|
|
725
|
+
e.value.style.chart.legend.show ? (i(), I(al, {
|
|
726
|
+
key: `legend_${Ce.value}`,
|
|
727
|
+
legendSet: ne.value,
|
|
728
|
+
config: ht.value,
|
|
729
|
+
onClickMarker: o[0] || (o[0] = ({ legend: l }) => z(l.uid))
|
|
730
|
+
}, ie({
|
|
731
|
+
item: v(({ legend: l, index: a }) => [
|
|
732
|
+
n(L) ? b("", !0) : (i(), f("div", {
|
|
733
|
+
key: 0,
|
|
734
|
+
onClick: (s) => z(l.uid),
|
|
735
|
+
style: R(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
|
|
736
|
+
}, de(l.display), 13, kl))
|
|
737
|
+
]),
|
|
738
|
+
_: 2
|
|
739
|
+
}, [
|
|
740
|
+
t.$slots.pattern ? {
|
|
741
|
+
name: "legend-pattern",
|
|
742
|
+
fn: v(({ legend: l, index: a }) => [
|
|
743
|
+
Q(tl, {
|
|
744
|
+
shape: l.shape,
|
|
745
|
+
radius: 30,
|
|
746
|
+
stroke: "none",
|
|
747
|
+
plot: { x: 30, y: 30 },
|
|
748
|
+
fill: `url(#pattern_${m.value}_${a})`
|
|
749
|
+
}, null, 8, ["shape", "fill"])
|
|
750
|
+
]),
|
|
751
|
+
key: "0"
|
|
752
|
+
} : void 0
|
|
753
|
+
]), 1032, ["legendSet", "config"])) : c(t.$slots, "legend", {
|
|
754
|
+
key: 1,
|
|
755
|
+
legend: ne.value
|
|
756
|
+
}, void 0, !0)
|
|
757
|
+
], 512)
|
|
758
|
+
], 8, ["to"])) : b("", !0),
|
|
759
|
+
t.$slots.source ? (i(), f("div", {
|
|
760
|
+
key: 6,
|
|
761
|
+
ref_key: "source",
|
|
762
|
+
ref: me,
|
|
763
|
+
dir: "auto"
|
|
764
|
+
}, [
|
|
765
|
+
c(t.$slots, "source", {}, void 0, !0)
|
|
766
|
+
], 512)) : b("", !0),
|
|
767
|
+
Q(n(Je), {
|
|
768
|
+
show: w.value.showTooltip && H.value && p.value.length < k.dataset.length,
|
|
769
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
770
|
+
color: e.value.style.chart.tooltip.color,
|
|
771
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
772
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
773
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
774
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
775
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
776
|
+
position: e.value.style.chart.tooltip.position,
|
|
777
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
778
|
+
parent: x.value,
|
|
779
|
+
content: K.value,
|
|
780
|
+
isFullscreen: D.value,
|
|
781
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
782
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
783
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
784
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
785
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
786
|
+
}, {
|
|
787
|
+
"tooltip-before": v(() => [
|
|
788
|
+
c(t.$slots, "tooltip-before", $(T({ ...se.value })), void 0, !0)
|
|
789
|
+
]),
|
|
790
|
+
"tooltip-after": v(() => [
|
|
791
|
+
c(t.$slots, "tooltip-after", $(T({ ...se.value })), void 0, !0)
|
|
792
|
+
]),
|
|
793
|
+
_: 3
|
|
794
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
795
|
+
pe.value && e.value.userOptions.buttons.table ? (i(), I(It(E.value.component), ze({ key: 7 }, E.value.props, {
|
|
796
|
+
ref_key: "tableUnit",
|
|
797
|
+
ref: U,
|
|
798
|
+
onClose: Be
|
|
799
|
+
}), ie({
|
|
800
|
+
content: v(() => [
|
|
801
|
+
(i(), I(n(et), {
|
|
802
|
+
key: `table_${we.value}`,
|
|
803
|
+
colNames: X.value.colNames,
|
|
804
|
+
head: X.value.head,
|
|
805
|
+
body: X.value.body,
|
|
806
|
+
config: X.value.config,
|
|
807
|
+
title: e.value.table.useDialog ? "" : E.value.title,
|
|
808
|
+
withCloseButton: !e.value.table.useDialog,
|
|
809
|
+
onClose: Be
|
|
810
|
+
}, {
|
|
811
|
+
th: v(({ th: l }) => [
|
|
812
|
+
C("div", {
|
|
813
|
+
innerHTML: l,
|
|
814
|
+
style: { display: "flex", "align-items": "center" }
|
|
815
|
+
}, null, 8, wl)
|
|
816
|
+
]),
|
|
817
|
+
td: v(({ td: l }) => [
|
|
818
|
+
Ee(de(l.name || l), 1)
|
|
819
|
+
]),
|
|
820
|
+
_: 1
|
|
821
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
822
|
+
]),
|
|
823
|
+
_: 2
|
|
824
|
+
}, [
|
|
825
|
+
e.value.table.useDialog ? {
|
|
826
|
+
name: "title",
|
|
827
|
+
fn: v(() => [
|
|
828
|
+
Ee(de(E.value.title), 1)
|
|
829
|
+
]),
|
|
830
|
+
key: "0"
|
|
831
|
+
} : void 0,
|
|
832
|
+
e.value.table.useDialog ? {
|
|
833
|
+
name: "actions",
|
|
834
|
+
fn: v(() => [
|
|
835
|
+
C("button", {
|
|
836
|
+
tabindex: "0",
|
|
837
|
+
class: "vue-ui-user-options-button",
|
|
838
|
+
onClick: o[1] || (o[1] = (l) => ue(e.value.userOptions.callbacks.csv))
|
|
839
|
+
}, [
|
|
840
|
+
Q(n(Ke), {
|
|
841
|
+
name: "excel",
|
|
842
|
+
stroke: E.value.props.color
|
|
843
|
+
}, null, 8, ["stroke"])
|
|
844
|
+
])
|
|
845
|
+
]),
|
|
846
|
+
key: "1"
|
|
847
|
+
} : void 0
|
|
848
|
+
]), 1040)) : b("", !0),
|
|
849
|
+
n(L) ? (i(), I(Qt, { key: 8 })) : b("", !0)
|
|
850
|
+
], 46, sl));
|
|
851
|
+
}
|
|
852
|
+
}, Bl = /* @__PURE__ */ nl(Cl, [["__scopeId", "data-v-46b6d787"]]);
|
|
853
|
+
export {
|
|
854
|
+
Bl as default
|
|
855
|
+
};
|