vue-data-ui 3.0.0-next.9 → 3.0.0

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.
Files changed (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -1,685 +0,0 @@
1
- import { defineAsyncComponent as P, useSlots as et, ref as i, computed as f, watch as tt, shallowRef as _e, onMounted as lt, onBeforeUnmount as ot, createElementBlock as p, openBlock as r, unref as s, normalizeStyle as S, normalizeClass as U, createBlock as N, createCommentVNode as m, createElementVNode as T, createVNode as Q, createSlots as Oe, withCtx as g, renderSlot as d, normalizeProps as R, guardReactiveProps as M, Fragment as Z, renderList as ee, mergeProps as at, toDisplayString as B, createTextVNode as st, nextTick as nt } from "vue";
2
- import { u as ut, c as Ie, t as rt, p as A, a as it, o as vt, e as te, g as ct, b as dt, G as ht, d as Pe, f as F, X as pt, s as gt, w as ft, v as j, i as Se, q as yt, r as mt, x as bt, y as kt } from "./index-CgShIRes.js";
3
- import { t as wt, u as Ct } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ne } from "./useNestedProp-BC4Ciblw.js";
5
- import { u as $t } from "./usePrinter-rIrqBbbm.js";
6
- import { u as Tt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as xt } from "./useChartAccessibility-9icAAmYg.js";
8
- import _t from "./Legend-BZ06qU55.js";
9
- import Ot from "./Title-B2dA6-uH.js";
10
- import { _ as It } from "./Shape-Mr1eIp_G.js";
11
- import Pt from "./img-C_9wps3s.js";
12
- import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const Nt = ["id"], At = ["xmlns", "viewBox"], Ft = ["width", "height"], Lt = ["id"], Vt = ["stop-color"], Rt = ["stop-color"], Mt = { key: 1 }, zt = ["stroke", "cx", "cy", "r", "fill"], Ut = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Bt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Et = ["cx", "cy", "r", "onMouseenter"], Wt = {
14
- key: 5,
15
- class: "vue-data-ui-watermark"
16
- }, Dt = ["onClick"], Gt = ["innerHTML"], Ht = {
17
- __name: "vue-ui-rings",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- emits: ["selectLegend"],
33
- setup(Ae, { expose: Fe, emit: Le }) {
34
- const Ve = P(() => import("./vue-ui-accordion-hlzscmAS.js")), Re = P(() => import("./DataTable--paavNqF.js")), Me = P(() => import("./PackageVersion-2QvaZf9_.js")), ze = P(() => import("./PenAndPaper-hGgW0EHz.js")), Ue = P(() => import("./vue-ui-skeleton-BsBaCvoE.js")), Be = P(() => import("./Tooltip-O_hCvqgF.js")), Ee = P(() => import("./UserOptions-Bk03FRqW.js")), { vue_ui_rings: We } = ut(), De = et(), b = Ae, I = i(!1), E = f(() => !!b.dataset && b.dataset.length), C = i(Ie()), Ge = i(null), W = i(!1), X = i(""), $ = i(null), le = i(0), x = i(null), oe = i(null), ae = i(null), se = i(null), ne = i(null), ue = i(0), re = i(0), ie = i(0), e = f({
35
- get: () => he(),
36
- set: (t) => t
37
- }), { userOptionsVisible: q, setUserOptionsVisibility: ve, keepUserOptionState: ce } = Tt({ config: e.value }), { svgRef: de } = xt({ config: e.value.style.chart.title });
38
- function he() {
39
- const t = Ne({
40
- userConfig: b.config,
41
- defaultConfig: We
42
- });
43
- return t.theme ? {
44
- ...Ne({
45
- userConfig: it.vue_ui_rings[t.theme] || b.config,
46
- defaultConfig: t
47
- }),
48
- customPalette: rt[t.theme] || A
49
- } : t;
50
- }
51
- tt(() => b.config, (t) => {
52
- e.value = he(), q.value = !e.value.userOptions.showOnChartHover, pe(), ue.value += 1, re.value += 1, ie.value += 1, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.chart.tooltip.show;
53
- }, { deep: !0 });
54
- const _ = _e(null), L = _e(null);
55
- lt(() => {
56
- pe();
57
- });
58
- function pe() {
59
- if (vt(b.dataset) ? te({
60
- componentName: "VueUiRings",
61
- type: "dataset"
62
- }) : b.dataset.forEach((t, o) => {
63
- t.values.length || te({
64
- componentName: "VueUiRings",
65
- type: "dataset"
66
- }), ct({
67
- datasetObject: t,
68
- requiredAttributes: ["name", "values"]
69
- }).forEach((l) => {
70
- te({
71
- componentName: "VueUiRings",
72
- type: "datasetSerieAttribute",
73
- property: l,
74
- index: o
75
- });
76
- });
77
- }), e.value.responsive) {
78
- const t = wt(() => {
79
- const { width: o, height: l } = Ct({
80
- chart: x.value,
81
- title: e.value.style.chart.title.text ? oe.value : null,
82
- legend: e.value.style.chart.legend.show ? ae.value : null,
83
- source: se.value,
84
- noTitle: ne.value
85
- });
86
- requestAnimationFrame(() => {
87
- n.value.width = o, n.value.height = l;
88
- });
89
- });
90
- _.value && (L.value && _.value.unobserve(L.value), _.value.disconnect()), _.value = new ResizeObserver(t), L.value = x.value.parentNode, _.value.observe(L.value);
91
- }
92
- setTimeout(() => {
93
- I.value = !0;
94
- }, 600);
95
- }
96
- ot(() => {
97
- _.value && (L.value && _.value.unobserve(L.value), _.value.disconnect());
98
- });
99
- const { isPrinting: ge, isImaging: fe, generatePdf: ye, generateImage: me } = $t({
100
- elementId: `rings_${C.value}`,
101
- fileName: e.value.style.chart.title.text || "vue-ui-rings",
102
- options: e.value.userOptions.print
103
- }), He = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), be = f(() => dt(e.value.customPalette)), k = i({
104
- showTable: e.value.table.show,
105
- showTooltip: e.value.style.chart.tooltip.show
106
- }), n = i({
107
- height: 360,
108
- width: 360
109
- }), je = f(() => Math.min(n.value.height, n.value.width)), Xe = Le, y = i([]);
110
- function Y(t) {
111
- y.value.includes(t) ? y.value = y.value.filter((o) => o !== t) : y.value.push(t), Xe("selectLegend", h.value.map((o) => ({
112
- name: o.name,
113
- color: o.color,
114
- value: o.value
115
- })));
116
- }
117
- const qe = f(() => Math.max(
118
- ...D.value.filter((t) => !y.value.includes(t.uid)).map(({ value: t }) => t)
119
- ));
120
- function ke(t) {
121
- return t / qe.value;
122
- }
123
- const D = f(() => b.dataset.map(({ values: t, name: o, color: l = null }, a) => {
124
- const u = ht(t).reduce((v, z) => v + z, 0);
125
- return {
126
- name: o,
127
- color: l || Pe(l) || be.value[a] || A[a] || A[a % A.length],
128
- value: u,
129
- proportion: u / b.dataset.map((v) => (v.values || []).reduce((z, Ze) => z + Ze, 0)).reduce((v, z) => v + z, 0),
130
- uid: Ie(),
131
- absoluteIndex: a
132
- };
133
- })), we = f(() => D.value.map((t) => ({
134
- ...t,
135
- shape: "circle",
136
- opacity: y.value.includes(t.uid) ? 0.5 : 1,
137
- segregate: () => Y(t.uid),
138
- isSegregated: y.value.includes(t.uid)
139
- })).toSorted((t, o) => o.value - t.value)), Ye = f(() => ({
140
- cy: "rings-div-legend",
141
- backgroundColor: e.value.style.chart.legend.backgroundColor,
142
- color: e.value.style.chart.legend.color,
143
- fontSize: e.value.style.chart.legend.fontSize,
144
- paddingBottom: 12,
145
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
146
- })), w = f(() => D.value.filter((t) => !y.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), h = f(() => D.value.filter((t) => !y.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a, absoluteIndex: u }, v) => ({
147
- absoluteIndex: u,
148
- uid: a,
149
- name: t,
150
- color: l || Pe(l) || be.value[v] || A[v] || A[v % A.length],
151
- value: o,
152
- proportion: ke(o),
153
- percentage: o / w.value * 100,
154
- strokeWidth: e.value.style.chart.layout.rings.strokeWidth * ke(o)
155
- })).toSorted((t, o) => o.value - t.value));
156
- function Je() {
157
- return h.value.map(
158
- ({ name: t, color: o, value: l, absoluteValues: a, percentage: u }) => ({
159
- name: t,
160
- color: o,
161
- value: l,
162
- absoluteValues: a,
163
- percentage: u
164
- })
165
- );
166
- }
167
- const c = f(() => je.value - e.value.style.chart.layout.rings.strokeWidth * 2), J = i(null);
168
- function Ke(t, o) {
169
- if (y.value.length === b.dataset.length) return;
170
- J.value = {
171
- datapoint: o,
172
- seriesIndex: t,
173
- series: h.value,
174
- config: e.value
175
- }, $.value = t;
176
- const l = h.value[t], a = e.value.style.chart.tooltip.customFormat;
177
- if (bt(a) && kt(() => a({
178
- seriesIndex: t,
179
- datapoint: o,
180
- series: h.value,
181
- config: e.value
182
- })))
183
- X.value = a({
184
- seriesIndex: t,
185
- datapoint: o,
186
- series: h.value,
187
- config: e.value
188
- });
189
- else {
190
- let u = "";
191
- u += `<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>`, u += `<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}" />${De.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${C.value}_${o.absoluteIndex})" />` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${Se(
192
- e.value.style.chart.layout.labels.dataLabels.formatter,
193
- l.value,
194
- F({
195
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
196
- v: l.value,
197
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
198
- r: e.value.style.chart.tooltip.roundingValue
199
- }),
200
- { datapoint: o, seriesIndex: t }
201
- )}
202
- </b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${F({
203
- v: l.value / w.value * 100,
204
- s: "%",
205
- r: e.value.style.chart.tooltip.roundingPercentage
206
- })})</span></div>` : u += `<b>${F({
207
- v: l.value / w.value * 100,
208
- s: "%",
209
- r: e.value.style.chart.tooltip.roundingPercentage
210
- })}</b></div>`), X.value = u;
211
- }
212
- W.value = !0;
213
- }
214
- const O = f(() => {
215
- const t = h.value.map((l) => ({
216
- name: l.name,
217
- color: l.color
218
- })), o = h.value.map((l) => l.value);
219
- return { head: t, body: o };
220
- }), G = f(() => {
221
- const t = [
222
- ' <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>',
223
- F({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
224
- "100%"
225
- ], o = O.value.head.map((u, v) => [
226
- {
227
- color: u.color,
228
- name: u.name
229
- },
230
- F({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: O.value.body[v], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
231
- isNaN(O.value.body[v] / w.value) ? "-" : (O.value.body[v] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
232
- ]), l = {
233
- th: {
234
- backgroundColor: e.value.table.th.backgroundColor,
235
- color: e.value.table.th.color,
236
- outline: e.value.table.th.outline
237
- },
238
- td: {
239
- backgroundColor: e.value.table.td.backgroundColor,
240
- color: e.value.table.td.color,
241
- outline: e.value.table.td.outline
242
- },
243
- breakpoint: e.value.table.responsiveBreakpoint
244
- }, a = [
245
- e.value.table.columnNames.series,
246
- e.value.table.columnNames.value,
247
- e.value.table.columnNames.percentage
248
- ];
249
- return {
250
- head: t,
251
- body: o,
252
- config: l,
253
- colNames: a
254
- };
255
- });
256
- function Ce(t = null) {
257
- nt(() => {
258
- const o = O.value.head.map((u, v) => [[
259
- u.name
260
- ], [O.value.body[v]], [isNaN(O.value.body[v] / w.value) ? "-" : O.value.body[v] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = yt(l);
261
- t ? t(a) : mt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-rings" });
262
- });
263
- }
264
- const V = i(!1);
265
- function $e(t) {
266
- V.value = t, le.value += 1;
267
- }
268
- function Te() {
269
- k.value.showTable = !k.value.showTable;
270
- }
271
- function xe() {
272
- k.value.showTooltip = !k.value.showTooltip;
273
- }
274
- const H = i(!1);
275
- function K() {
276
- H.value = !H.value;
277
- }
278
- async function Qe({ scale: t = 2 } = {}) {
279
- if (!x.value) return;
280
- const { width: o, height: l } = x.value.getBoundingClientRect(), a = o / l, { imageUri: u, base64: v } = await Pt({ domElement: x.value, base64: !0, img: !0, scale: t });
281
- return {
282
- imageUri: u,
283
- base64: v,
284
- title: e.value.style.chart.title.text,
285
- width: o,
286
- height: l,
287
- aspectRatio: a
288
- };
289
- }
290
- return Fe({
291
- getData: Je,
292
- getImage: Qe,
293
- generatePdf: ye,
294
- generateCsv: Ce,
295
- generateImage: me,
296
- toggleTable: Te,
297
- toggleTooltip: xe,
298
- toggleAnnotator: K,
299
- toggleFullscreen: $e
300
- }), (t, o) => (r(), p("div", {
301
- ref_key: "ringsChart",
302
- ref: x,
303
- class: U(`vue-ui-rings ${V.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
304
- style: S(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
305
- id: `rings_${C.value}`,
306
- onMouseleave: o[3] || (o[3] = (l) => {
307
- $.value = null, W.value = !1, s(ve)(!1);
308
- }),
309
- onMouseenter: o[4] || (o[4] = () => s(ve)(!0))
310
- }, [
311
- e.value.userOptions.buttons.annotator ? (r(), N(s(ze), {
312
- key: 0,
313
- svgRef: s(de),
314
- backgroundColor: e.value.style.chart.backgroundColor,
315
- color: e.value.style.chart.color,
316
- active: H.value,
317
- onClose: K
318
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
319
- He.value ? (r(), p("div", {
320
- key: 1,
321
- ref_key: "noTitle",
322
- ref: ne,
323
- class: "vue-data-ui-no-title-space",
324
- style: "height:36px; width: 100%;background:transparent"
325
- }, null, 512)) : m("", !0),
326
- e.value.style.chart.title.text ? (r(), p("div", {
327
- key: 2,
328
- ref_key: "chartTitle",
329
- ref: oe,
330
- style: "width:100%;background:transparent"
331
- }, [
332
- (r(), N(Ot, {
333
- key: `title_${ue.value}`,
334
- config: {
335
- title: {
336
- cy: "rings-div-title",
337
- ...e.value.style.chart.title
338
- },
339
- subtitle: {
340
- cy: "rings-div-subtitle",
341
- ...e.value.style.chart.title.subtitle
342
- }
343
- }
344
- }, null, 8, ["config"]))
345
- ], 512)) : m("", !0),
346
- e.value.userOptions.show && E.value && (s(ce) || s(q)) ? (r(), N(s(Ee), {
347
- ref_key: "details",
348
- ref: Ge,
349
- key: `user_options_${le.value}`,
350
- backgroundColor: e.value.style.chart.backgroundColor,
351
- color: e.value.style.chart.color,
352
- isPrinting: s(ge),
353
- isImaging: s(fe),
354
- uid: C.value,
355
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
356
- hasPdf: e.value.userOptions.buttons.pdf,
357
- hasXls: e.value.userOptions.buttons.csv,
358
- hasImg: e.value.userOptions.buttons.img,
359
- hasTable: e.value.userOptions.buttons.table,
360
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
361
- isTooltip: k.value.showTooltip,
362
- isFullscreen: V.value,
363
- titles: { ...e.value.userOptions.buttonTitles },
364
- chartElement: x.value,
365
- position: e.value.userOptions.position,
366
- hasAnnotator: e.value.userOptions.buttons.annotator,
367
- isAnnotation: H.value,
368
- callbacks: e.value.userOptions.callbacks,
369
- printScale: e.value.userOptions.print.scale,
370
- onToggleFullscreen: $e,
371
- onGeneratePdf: s(ye),
372
- onGenerateCsv: Ce,
373
- onGenerateImage: s(me),
374
- onToggleTable: Te,
375
- onToggleTooltip: xe,
376
- onToggleAnnotator: K,
377
- style: S({
378
- visibility: s(ce) ? s(q) ? "visible" : "hidden" : "visible"
379
- })
380
- }, Oe({ _: 2 }, [
381
- t.$slots.menuIcon ? {
382
- name: "menuIcon",
383
- fn: g(({ isOpen: l, color: a }) => [
384
- d(t.$slots, "menuIcon", R(M({ isOpen: l, color: a })), void 0, !0)
385
- ]),
386
- key: "0"
387
- } : void 0,
388
- t.$slots.optionTooltip ? {
389
- name: "optionTooltip",
390
- fn: g(() => [
391
- d(t.$slots, "optionTooltip", {}, void 0, !0)
392
- ]),
393
- key: "1"
394
- } : void 0,
395
- t.$slots.optionPdf ? {
396
- name: "optionPdf",
397
- fn: g(() => [
398
- d(t.$slots, "optionPdf", {}, void 0, !0)
399
- ]),
400
- key: "2"
401
- } : void 0,
402
- t.$slots.optionCsv ? {
403
- name: "optionCsv",
404
- fn: g(() => [
405
- d(t.$slots, "optionCsv", {}, void 0, !0)
406
- ]),
407
- key: "3"
408
- } : void 0,
409
- t.$slots.optionImg ? {
410
- name: "optionImg",
411
- fn: g(() => [
412
- d(t.$slots, "optionImg", {}, void 0, !0)
413
- ]),
414
- key: "4"
415
- } : void 0,
416
- t.$slots.optionTable ? {
417
- name: "optionTable",
418
- fn: g(() => [
419
- d(t.$slots, "optionTable", {}, void 0, !0)
420
- ]),
421
- key: "5"
422
- } : void 0,
423
- t.$slots.optionFullscreen ? {
424
- name: "optionFullscreen",
425
- fn: g(({ toggleFullscreen: l, isFullscreen: a }) => [
426
- d(t.$slots, "optionFullscreen", R(M({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
427
- ]),
428
- key: "6"
429
- } : void 0,
430
- t.$slots.optionAnnotator ? {
431
- name: "optionAnnotator",
432
- fn: g(({ toggleAnnotator: l, isAnnotator: a }) => [
433
- d(t.$slots, "optionAnnotator", R(M({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
434
- ]),
435
- key: "7"
436
- } : void 0
437
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
438
- E.value ? (r(), p("svg", {
439
- key: 4,
440
- ref_key: "svgRef",
441
- ref: de,
442
- xmlns: s(pt),
443
- class: U({ "vue-data-ui-fullscreen--on": V.value, "vue-data-ui-fulscreen--off": !V.value }),
444
- viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
445
- style: S(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
446
- }, [
447
- Q(s(Me)),
448
- t.$slots["chart-background"] ? (r(), p("foreignObject", {
449
- key: 0,
450
- x: 0,
451
- y: 0,
452
- width: n.value.width <= 0 ? 10 : n.value.width,
453
- height: n.value.height <= 0 ? 10 : n.value.height,
454
- style: {
455
- pointerEvents: "none"
456
- }
457
- }, [
458
- d(t.$slots, "chart-background", {}, void 0, !0)
459
- ], 8, Ft)) : m("", !0),
460
- T("defs", null, [
461
- (r(!0), p(Z, null, ee(h.value, (l, a) => (r(), p("radialGradient", {
462
- cx: "50%",
463
- cy: "30%",
464
- r: "50%",
465
- fx: "50%",
466
- fy: "50%",
467
- id: `gradient_${C.value}_${a}`
468
- }, [
469
- T("stop", {
470
- offset: "0%",
471
- "stop-color": s(gt)(s(ft)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
472
- }, null, 8, Vt),
473
- T("stop", {
474
- offset: "100%",
475
- "stop-color": l.color
476
- }, null, 8, Rt)
477
- ], 8, Lt))), 256))
478
- ]),
479
- t.$slots.pattern ? (r(), p("g", Mt, [
480
- (r(!0), p(Z, null, ee(h.value, (l) => (r(), p("defs", null, [
481
- d(t.$slots, "pattern", at({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${C.value}_${l.absoluteIndex}` }), void 0, !0)
482
- ]))), 256))
483
- ])) : m("", !0),
484
- (r(!0), p(Z, null, ee(h.value, (l, a) => (r(), p("g", null, [
485
- T("circle", {
486
- class: U({
487
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
488
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
489
- "vue-ui-rings-opacity": $.value !== null && $.value !== a
490
- }),
491
- style: S(`animation-delay:${a * 100}ms`),
492
- stroke: e.value.style.chart.layout.rings.stroke,
493
- cx: n.value.width / 2,
494
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
495
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
496
- fill: e.value.style.chart.layout.rings.gradient.underlayerColor
497
- }, null, 14, zt),
498
- T("circle", {
499
- class: U({
500
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
501
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
502
- "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
503
- "vue-ui-rings-blur": $.value !== null && $.value !== a
504
- }),
505
- style: S(`animation-delay:${a * 100}ms`),
506
- stroke: e.value.style.chart.layout.rings.stroke,
507
- "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
508
- cx: n.value.width / 2,
509
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
510
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
511
- fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${C.value}_${a})` : l.color
512
- }, null, 14, Ut),
513
- t.$slots.pattern ? (r(), p("circle", {
514
- key: 0,
515
- class: U({
516
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
517
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
518
- "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
519
- "vue-ui-rings-blur": $.value !== null && $.value !== a
520
- }),
521
- style: S(`animation-delay:${a * 100}ms`),
522
- stroke: e.value.style.chart.layout.rings.stroke,
523
- "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
524
- cx: n.value.width / 2,
525
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
526
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
527
- fill: `url(#pattern_${C.value}_${l.absoluteIndex})`
528
- }, null, 14, Bt)) : m("", !0),
529
- T("circle", {
530
- stroke: "none",
531
- cx: n.value.width / 2,
532
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
533
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
534
- fill: "transparent",
535
- onMouseenter: (u) => Ke(a, l),
536
- onMouseleave: o[0] || (o[0] = (u) => {
537
- $.value = null, W.value = !1;
538
- })
539
- }, null, 40, Et)
540
- ]))), 256)),
541
- d(t.$slots, "svg", { svg: n.value }, void 0, !0)
542
- ], 14, At)) : m("", !0),
543
- t.$slots.watermark ? (r(), p("div", Wt, [
544
- d(t.$slots, "watermark", R(M({ isPrinting: s(ge) || s(fe) })), void 0, !0)
545
- ])) : m("", !0),
546
- E.value ? m("", !0) : (r(), N(s(Ue), {
547
- key: 6,
548
- config: {
549
- type: "rings",
550
- style: {
551
- backgroundColor: e.value.style.chart.backgroundColor,
552
- rings: {
553
- color: "#CCCCCC"
554
- }
555
- }
556
- }
557
- }, null, 8, ["config"])),
558
- T("div", {
559
- ref_key: "chartLegend",
560
- ref: ae
561
- }, [
562
- e.value.style.chart.legend.show ? (r(), N(_t, {
563
- key: `legend_${ie.value}`,
564
- legendSet: we.value,
565
- config: Ye.value,
566
- onClickMarker: o[1] || (o[1] = ({ legend: l }) => Y(l.uid))
567
- }, Oe({
568
- item: g(({ legend: l, index: a }) => [
569
- T("div", {
570
- onClick: (u) => Y(l.uid),
571
- style: S(`opacity:${y.value.includes(l.uid) ? 0.5 : 1}`)
572
- }, B(l.name) + B(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + B(e.value.style.chart.legend.showValue ? s(Se)(
573
- e.value.style.chart.layout.labels.dataLabels.formatter,
574
- l.value,
575
- s(F)({
576
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
577
- v: l.value,
578
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
579
- r: e.value.style.chart.legend.roundingValue
580
- }),
581
- { datapoint: l, seriesIndex: a }
582
- ) : "") + " " + B(e.value.style.chart.legend.showPercentage ? y.value.includes(l.uid) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / w.value) ? "-" : s(F)({
583
- v: l.value / w.value * 100,
584
- s: "%",
585
- r: e.value.style.chart.legend.roundingPercentage
586
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Dt)
587
- ]),
588
- _: 2
589
- }, [
590
- t.$slots.pattern ? {
591
- name: "legend-pattern",
592
- fn: g(({ legend: l, index: a }) => [
593
- Q(It, {
594
- shape: l.shape,
595
- radius: 30,
596
- stroke: "none",
597
- plot: { x: 30, y: 30 },
598
- fill: `url(#pattern_${C.value}_${a})`
599
- }, null, 8, ["shape", "fill"])
600
- ]),
601
- key: "0"
602
- } : void 0
603
- ]), 1032, ["legendSet", "config"])) : d(t.$slots, "legend", {
604
- key: 1,
605
- legend: we.value
606
- }, void 0, !0)
607
- ], 512),
608
- t.$slots.source ? (r(), p("div", {
609
- key: 7,
610
- ref_key: "source",
611
- ref: se,
612
- dir: "auto"
613
- }, [
614
- d(t.$slots, "source", {}, void 0, !0)
615
- ], 512)) : m("", !0),
616
- Q(s(Be), {
617
- show: k.value.showTooltip && W.value && y.value.length < b.dataset.length,
618
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
619
- color: e.value.style.chart.tooltip.color,
620
- borderRadius: e.value.style.chart.tooltip.borderRadius,
621
- borderColor: e.value.style.chart.tooltip.borderColor,
622
- borderWidth: e.value.style.chart.tooltip.borderWidth,
623
- fontSize: e.value.style.chart.tooltip.fontSize,
624
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
625
- position: e.value.style.chart.tooltip.position,
626
- offsetY: e.value.style.chart.tooltip.offsetY,
627
- parent: x.value,
628
- content: X.value,
629
- isFullscreen: V.value,
630
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
631
- }, {
632
- "tooltip-before": g(() => [
633
- d(t.$slots, "tooltip-before", R(M({ ...J.value })), void 0, !0)
634
- ]),
635
- "tooltip-after": g(() => [
636
- d(t.$slots, "tooltip-after", R(M({ ...J.value })), void 0, !0)
637
- ]),
638
- _: 3
639
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
640
- E.value ? (r(), N(s(Ve), {
641
- key: 8,
642
- hideDetails: "",
643
- config: {
644
- open: k.value.showTable,
645
- maxHeight: 1e4,
646
- body: {
647
- backgroundColor: e.value.style.chart.backgroundColor,
648
- color: e.value.style.chart.color
649
- },
650
- head: {
651
- backgroundColor: e.value.style.chart.backgroundColor,
652
- color: e.value.style.chart.color
653
- }
654
- }
655
- }, {
656
- content: g(() => [
657
- (r(), N(s(Re), {
658
- key: `table_${re.value}`,
659
- colNames: G.value.colNames,
660
- head: G.value.head,
661
- body: G.value.body,
662
- config: G.value.config,
663
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
664
- onClose: o[2] || (o[2] = (l) => k.value.showTable = !1)
665
- }, {
666
- th: g(({ th: l }) => [
667
- T("div", {
668
- innerHTML: l,
669
- style: { display: "flex", "align-items": "center" }
670
- }, null, 8, Gt)
671
- ]),
672
- td: g(({ td: l }) => [
673
- st(B(l.name || l), 1)
674
- ]),
675
- _: 1
676
- }, 8, ["colNames", "head", "body", "config", "title"]))
677
- ]),
678
- _: 1
679
- }, 8, ["config"])) : m("", !0)
680
- ], 46, Nt));
681
- }
682
- }, al = /* @__PURE__ */ St(Ht, [["__scopeId", "data-v-a8630f5d"]]);
683
- export {
684
- al as default
685
- };