vue-data-ui 3.0.0-next.70 → 3.0.0-next.72

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 (91) hide show
  1. package/dist/{Arrow-fzydFjfE.js → Arrow-CMSMde41.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BwazM8ka.js → BaseDraggableDialog-BuO_En6p.js} +2 -2
  3. package/dist/{BaseIcon-BnbvQjs5.js → BaseIcon-C_HE-fPU.js} +1 -1
  4. package/dist/{ColorPicker-DR1Yr4kR.js → ColorPicker-Cn82Up5w.js} +2 -2
  5. package/dist/{DataTable-CKpA_OA_.js → DataTable-DMCB2CPj.js} +2 -2
  6. package/dist/{Legend-ChXhJNzd.js → Legend-C96fnhZD.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-CPOpM7Os.js → NonSvgPenAndPaper-BRi2CtMk.js} +3 -3
  8. package/dist/{PackageVersion-CBHvscRY.js → PackageVersion-B8cypgdJ.js} +1 -1
  9. package/dist/{PenAndPaper-BCcfYvgR.js → PenAndPaper-DjXtQYum.js} +3 -3
  10. package/dist/{Shape-C1rNfsMY.js → Shape-DZSz-yYr.js} +1 -1
  11. package/dist/{Slicer-D8a4Wv1q.js → Slicer-BOc4PzAR.js} +2 -2
  12. package/dist/{SparkTooltip-BUdf02cs.js → SparkTooltip-4K9Ezba0.js} +1 -1
  13. package/dist/{Title-feqCv0Si.js → Title-DnqOjg_N.js} +1 -1
  14. package/dist/{Tooltip-DQbksria.js → Tooltip-Cy2owh0T.js} +1 -1
  15. package/dist/{UserOptions-CGnAZpYs.js → UserOptions-Tx_9Xl_c.js} +2 -2
  16. package/dist/{dom-to-png-DTPmkDTK.js → dom-to-png-CDSxjzSn.js} +1 -1
  17. package/dist/{img-_RMhslMZ.js → img-D_LTOBii.js} +1 -1
  18. package/dist/{index-CnY41r21.js → index-Bzm4bjdY.js} +1380 -1337
  19. package/dist/{pdf-C02XBmhm.js → pdf-BZQLWJMc.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +12 -0
  22. package/dist/types/vue-data-ui.d.ts +12 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-DVYZBwNc.js → useAutoSizeLabelsInsideViewbox-Rg0B250v.js} +1 -1
  24. package/dist/{useNestedProp-DtUATNAU.js → useNestedProp-FhaE2yv-.js} +1 -1
  25. package/dist/{usePrinter-CJ1uZx0D.js → usePrinter-DZsH7qQs.js} +2 -2
  26. package/dist/{vue-data-ui-DDBabVWX.js → vue-data-ui-0ns7pHNm.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CtPXePUa.js → vue-ui-3d-bar-CY9hrF9C.js} +6 -6
  29. package/dist/{vue-ui-accordion-CnLY8CrQ.js → vue-ui-accordion-ywMTtl25.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-CvrNLE47.js → vue-ui-age-pyramid-Qd4BtrXy.js} +6 -6
  31. package/dist/{vue-ui-annotator-NuSwWka4.js → vue-ui-annotator-DmOJnYF9.js} +2 -2
  32. package/dist/{vue-ui-bullet-CpIVgkPB.js → vue-ui-bullet-B_xIDBAw.js} +7 -7
  33. package/dist/{vue-ui-candlestick-DGWKUeJp.js → vue-ui-candlestick-D3Vsh4Rw.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-DWbQS8F3.js → vue-ui-carousel-table-D0UgiRmJ.js} +4 -4
  35. package/dist/{vue-ui-chestnut-K4-oOYff.js → vue-ui-chestnut-CbMOcXYQ.js} +664 -536
  36. package/dist/{vue-ui-chord-DqmP8yTR.js → vue-ui-chord-DDzp12Vp.js} +8 -8
  37. package/dist/{vue-ui-circle-pack-D_ufubH5.js → vue-ui-circle-pack-DOXx17NQ.js} +6 -6
  38. package/dist/{vue-ui-cursor-B0tP4woK.js → vue-ui-cursor-Bg-6DHbI.js} +2 -2
  39. package/dist/{vue-ui-dashboard-D_7qyx3P.js → vue-ui-dashboard-DY2lvJ7A.js} +62 -62
  40. package/dist/{vue-ui-digits-pUQErY07.js → vue-ui-digits-De2GmG2N.js} +2 -2
  41. package/dist/{vue-ui-donut-Dl__PVfq.js → vue-ui-donut-BWQ6g1O7.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-BCGGTZZI.js → vue-ui-donut-evolution-DAzSv9V-.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-KzCa3k9g.js → vue-ui-dumbbell-B32YuCNM.js} +7 -7
  44. package/dist/{vue-ui-flow-B1AOqk14.js → vue-ui-flow-BZkt6OKd.js} +7 -7
  45. package/dist/{vue-ui-funnel-DCl9v71X.js → vue-ui-funnel-8WAXLQAo.js} +6 -6
  46. package/dist/vue-ui-galaxy-gfw2BThf.js +680 -0
  47. package/dist/{vue-ui-gauge-Cg4qAOEf.js → vue-ui-gauge-Ch5vl4T9.js} +7 -7
  48. package/dist/{vue-ui-gizmo-CQmMkODw.js → vue-ui-gizmo-CU8ddGLr.js} +3 -3
  49. package/dist/{vue-ui-heatmap-CgkgUDI0.js → vue-ui-heatmap-YO1tESN5.js} +7 -7
  50. package/dist/{vue-ui-history-plot-CYvkTszV.js → vue-ui-history-plot-C41s9ybF.js} +7 -7
  51. package/dist/{vue-ui-kpi-BDuOZbc2.js → vue-ui-kpi-H6MYZwLY.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-BZaU_YD-.js → vue-ui-mini-loader-Bnjg3O7d.js} +2 -2
  53. package/dist/{vue-ui-molecule-HYjHgVuN.js → vue-ui-molecule-DF4leieh.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-4pYtL93A.js → vue-ui-mood-radar-NrPILZdk.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-BVbvVm19.js → vue-ui-nested-donuts-BLnO_Mgf.js} +9 -9
  56. package/dist/{vue-ui-onion-DQg97Dwm.js → vue-ui-onion-66T65iJH.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-KQ4FTUda.js → vue-ui-parallel-coordinate-plot-B5N_TkrQ.js} +8 -8
  58. package/dist/{vue-ui-quadrant-D8OU7TFs.js → vue-ui-quadrant-BoCrqBMk.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-BOKDoHdK.js → vue-ui-quick-chart-B0VC0eh-.js} +6 -6
  60. package/dist/{vue-ui-radar-2hTf-Qrf.js → vue-ui-radar-CFVWdaIn.js} +8 -8
  61. package/dist/{vue-ui-rating-QriKDSO7.js → vue-ui-rating-A58gcO8T.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-DqLiKEHw.js → vue-ui-relation-circle-DU5SHiGv.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-CvFlsavM.js → vue-ui-ridgeline-DbL2yTIh.js} +8 -8
  64. package/dist/{vue-ui-rings-B2ges9Ud.js → vue-ui-rings-Bv6MCURJ.js} +8 -8
  65. package/dist/{vue-ui-scatter-DQJeFlv4.js → vue-ui-scatter-BmN7rTrR.js} +8 -8
  66. package/dist/{vue-ui-skeleton-Bghm5obp.js → vue-ui-skeleton-C4h4fFuO.js} +3 -3
  67. package/dist/{vue-ui-smiley-C3SkDNoz.js → vue-ui-smiley-7OtzDLyY.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-dd8h3N7H.js → vue-ui-spark-trend-CDJGeE9c.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BTj8M7fY.js → vue-ui-sparkbar-D77zOuEC.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-BBQAo-W1.js → vue-ui-sparkgauge-BksxAHf4.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-C4ZEcb8S.js → vue-ui-sparkhistogram-dgigFSzZ.js} +4 -4
  72. package/dist/{vue-ui-sparkline-Bm3GpqJx.js → vue-ui-sparkline-Dy1tSgMy.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-Dde4iayd.js → vue-ui-sparkstackbar-DVPYzftP.js} +3 -3
  74. package/dist/{vue-ui-stackbar-DPvfNjwH.js → vue-ui-stackbar-BSsTXQJ2.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-iZIN9U90.js → vue-ui-strip-plot-F41CWin2.js} +7 -7
  76. package/dist/{vue-ui-table-C4EoviSd.js → vue-ui-table-BmnsgnjO.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-D-eqO3LU.js → vue-ui-table-heatmap-GuaexCA-.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-CD7IH49g.js → vue-ui-table-sparkline-DktY9A1C.js} +4 -4
  79. package/dist/{vue-ui-thermometer-BKEFH2Xt.js → vue-ui-thermometer-EhgTVfFj.js} +7 -7
  80. package/dist/{vue-ui-timer-hhKj1gPp.js → vue-ui-timer-Cd3Yt7HA.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-CmNwCnVC.js → vue-ui-tiremarks-DjDnFHWc.js} +6 -6
  82. package/dist/{vue-ui-treemap-BL7T8x_B.js → vue-ui-treemap-BGLUEQit.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-CGn_OX3P.js → vue-ui-vertical-bar-DhVF0WZY.js} +9 -9
  84. package/dist/{vue-ui-waffle-qfT-wDhI.js → vue-ui-waffle-gXnHM7Qo.js} +8 -8
  85. package/dist/{vue-ui-wheel-B8J8C3AN.js → vue-ui-wheel-Ce2IQFq7.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-B6oHFfEK.js → vue-ui-word-cloud-BDFn0rUl.js} +6 -6
  87. package/dist/{vue-ui-world-BEv_oTrC.js → vue-ui-world-Cev3j25p.js} +6 -6
  88. package/dist/{vue-ui-xy-DPBrciAR.js → vue-ui-xy-CNMFnao9.js} +9 -9
  89. package/dist/{vue-ui-xy-canvas-BXT3mXj5.js → vue-ui-xy-canvas-B04eI10U.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-galaxy-0rAzDHe5.js +0 -619
@@ -1,619 +0,0 @@
1
- import { defineAsyncComponent as k, computed as p, onMounted as Ue, ref as n, watch as We, createElementBlock as i, openBlock as r, unref as o, normalizeStyle as M, normalizeClass as B, createBlock as x, createCommentVNode as c, renderSlot as v, createVNode as de, createSlots as He, withCtx as d, normalizeProps as P, guardReactiveProps as S, createElementVNode as _, Fragment as he, renderList as pe, toDisplayString as I, createTextVNode as Xe, nextTick as je } from "vue";
2
- import { u as Ye, o as qe, f as ge, g as Je, c as ye, a as Ke, p as G, b as Qe, d as Ze, G as fe, e as et, M as tt, i as C, X as lt, k as be, y as me, v as at, w as ot, z as st } from "./index-CnY41r21.js";
3
- import { u as ke } from "./useNestedProp-DtUATNAU.js";
4
- import { u as rt } from "./usePrinter-CJ1uZx0D.js";
5
- import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as nt } from "./useChartAccessibility-9icAAmYg.js";
7
- import it from "./img-_RMhslMZ.js";
8
- import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- const vt = ["id"], dt = {
10
- key: 1,
11
- ref: "noTitle",
12
- class: "vue-data-ui-no-title-space",
13
- style: "height:36px; width: 100%;background:transparent"
14
- }, ht = {
15
- key: 2,
16
- style: "width:100%;background:transparent;padding-bottom:24px"
17
- }, pt = ["xmlns", "viewBox"], gt = ["width", "height"], yt = ["id"], ft = ["stdDeviation"], bt = ["d", "stroke", "stroke-width"], mt = ["d", "stroke", "stroke-width"], kt = ["filter"], wt = ["d", "stroke", "stroke-width"], Ct = ["d", "stroke-width", "onMouseenter", "onClick"], $t = {
18
- key: 5,
19
- class: "vue-data-ui-watermark"
20
- }, xt = ["onClick"], Tt = {
21
- key: 8,
22
- ref: "source",
23
- dir: "auto"
24
- }, Ot = ["innerHTML"], Pt = {
25
- __name: "vue-ui-galaxy",
26
- props: {
27
- config: {
28
- type: Object,
29
- default() {
30
- return {};
31
- }
32
- },
33
- dataset: {
34
- type: Array,
35
- default() {
36
- return [];
37
- }
38
- }
39
- },
40
- emits: ["selectLegend", "selectDatapoint"],
41
- setup(we, { expose: Ce, emit: $e }) {
42
- const xe = k(() => import("./vue-ui-accordion-CnLY8CrQ.js")), Te = k(() => import("./DataTable-CKpA_OA_.js")), Oe = k(() => import("./Legend-ChXhJNzd.js")), Pe = k(() => import("./PackageVersion-CBHvscRY.js")), Se = k(() => import("./PenAndPaper-BCcfYvgR.js")), _e = k(() => import("./vue-ui-skeleton-Bghm5obp.js")), Ne = k(() => import("./Title-feqCv0Si.js")), Fe = k(() => import("./Tooltip-DQbksria.js")), Le = k(() => import("./UserOptions-CGnAZpYs.js")), { vue_ui_galaxy: Ie } = Ye(), f = we, A = p(() => !!f.dataset && f.dataset.length);
43
- Ue(() => {
44
- X();
45
- });
46
- function X() {
47
- qe(f.dataset) ? ge({
48
- componentName: "VueUiGalaxy",
49
- type: "dataset"
50
- }) : f.dataset.forEach((t, a) => {
51
- Je({
52
- datasetObject: t,
53
- requiredAttributes: ["name", "values"]
54
- }).forEach((l) => {
55
- ge({
56
- componentName: "VueUiGalaxy",
57
- type: "datasetSerieAttribute",
58
- property: l,
59
- index: a
60
- });
61
- });
62
- });
63
- }
64
- const N = n(ye()), T = n(null), Ae = n(null), D = n(!1), z = n(""), b = n(null), j = n(0), Y = n(0), q = n(0), J = n(0), e = p({
65
- get: () => ee(),
66
- set: (t) => t
67
- }), { userOptionsVisible: R, setUserOptionsVisibility: K, keepUserOptionState: Q } = ut({ config: e.value }), { svgRef: Z } = nt({ config: e.value.style.chart.title });
68
- function ee() {
69
- const t = ke({
70
- userConfig: f.config,
71
- defaultConfig: Ie
72
- });
73
- return t.theme ? {
74
- ...ke({
75
- userConfig: Qe.vue_ui_galaxy[t.theme] || f.config,
76
- defaultConfig: t
77
- }),
78
- customPalette: Ke[t.theme] || G
79
- } : t;
80
- }
81
- We(() => f.config, (t) => {
82
- e.value = ee(), R.value = !e.value.userOptions.showOnChartHover, X(), Y.value += 1, q.value += 1, J.value += 1, g.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, g.value.showTable = e.value.table.show, g.value.showTooltip = e.value.style.chart.tooltip.show;
83
- }, { deep: !0 });
84
- const { isPrinting: te, isImaging: le, generatePdf: ae, generateImage: oe } = rt({
85
- elementId: `galaxy_${N.value}`,
86
- fileName: e.value.style.chart.title.text || "vue-ui-galaxy",
87
- options: e.value.userOptions.print
88
- }), Ve = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ee = p(() => Ze(e.value.customPalette)), g = n({
89
- dataLabels: {
90
- show: e.value.style.chart.layout.labels.dataLabels.show
91
- },
92
- showTable: e.value.table.show,
93
- showTooltip: e.value.style.chart.tooltip.show
94
- }), F = n({
95
- height: 180,
96
- // or 250 if non fibo
97
- width: 250
98
- }), se = $e, y = n([]);
99
- function U(t) {
100
- y.value.includes(t.id) ? y.value = y.value.filter((a) => a !== t.id) : y.value.push(t.id), se("selectLegend", L.value.map((a) => ({
101
- name: a.name,
102
- color: a.color,
103
- value: a.value
104
- })));
105
- }
106
- const $ = p(() => f.dataset.map((t, a) => ({
107
- name: t.name,
108
- color: et(t.color) || Ee.value[a] || G[a] || G[a % G.length],
109
- value: t.values ? fe(t.values).reduce((l, s) => l + s, 0) : 0,
110
- absoluteValues: fe(t.values),
111
- id: ye(),
112
- seriesIndex: a
113
- })).sort((t, a) => a.value - t.value));
114
- function Me() {
115
- return $.value.map((t) => ({
116
- name: t.name,
117
- color: t.color,
118
- value: t.value
119
- }));
120
- }
121
- const m = p(() => $.value.filter((t) => !y.value.includes(t.id)).map((t) => t.value).reduce((t, a) => t + a, 0)), Be = n(190), re = p(() => $.value.filter((t) => !y.value.includes(t.id))), L = p(() => {
122
- const t = [];
123
- for (let a = 0; a < re.value.length; a += 1) {
124
- const l = re.value[a];
125
- let s = l.value / m.value * Be.value;
126
- a > 0 && t.length && (s += t[a - 1].points), t.push({
127
- points: s,
128
- ...l,
129
- seriesIndex: a,
130
- proportion: l.value / m.value,
131
- path: tt({
132
- points: s,
133
- startX: 115 + e.value.style.chart.layout.arcs.offsetX,
134
- startY: 90 + e.value.style.chart.layout.arcs.offsetY
135
- })
136
- });
137
- }
138
- return t.filter((a, l) => !y.value.includes(a.id)).toSorted((a, l) => l.points - a.points);
139
- }), O = n(!1);
140
- function ue(t) {
141
- O.value = t, j.value += 1;
142
- }
143
- const W = n(null);
144
- function Ge({ datapoint: t, _relativeIndex: a, seriesIndex: l, show: s = !1 }) {
145
- W.value = {
146
- datapoint: t,
147
- seriesIndex: l,
148
- series: $.value,
149
- config: e.value
150
- }, D.value = s, b.value = t.id;
151
- let u = "";
152
- const h = e.value.style.chart.tooltip.customFormat;
153
- me(h) && st(() => h({
154
- seriesIndex: l,
155
- datapoint: t,
156
- series: $.value,
157
- config: e.value
158
- })) ? z.value = h({
159
- seriesIndex: l,
160
- datapoint: t,
161
- series: $.value,
162
- config: e.value
163
- }) : (u += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, u += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${be(
164
- e.value.style.chart.layout.labels.dataLabels.formatter,
165
- t.value,
166
- C({
167
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
168
- v: t.value,
169
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
170
- r: e.value.style.chart.tooltip.roundingValue
171
- }),
172
- { datapoint: t, seriesIndex: l }
173
- )}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${C({
174
- v: t.proportion * 100,
175
- s: "%",
176
- r: e.value.style.chart.tooltip.roundingPercentage
177
- })})</span></div>` : u += `<b>${C({
178
- v: t.proportion * 100,
179
- s: "%",
180
- r: e.value.style.chart.tooltip.roundingPercentage
181
- })}</b></div>`), z.value = `<div>${u}</div>`);
182
- }
183
- const ne = p(() => $.value.map((t, a) => ({
184
- ...t,
185
- proportion: (t.value || 0) / f.dataset.map((l) => (l.values || []).reduce((s, u) => s + u, 0)).reduce((l, s) => l + s, 0),
186
- opacity: y.value.includes(t.id) ? 0.5 : 1,
187
- shape: t.shape || "circle",
188
- segregate: () => U(t),
189
- isSegregated: y.value.includes(t.id)
190
- }))), De = p(() => ({
191
- cy: "galaxy-div-legend",
192
- backgroundColor: e.value.style.chart.legend.backgroundColor,
193
- color: e.value.style.chart.legend.color,
194
- fontSize: e.value.style.chart.legend.fontSize,
195
- paddingBottom: 12,
196
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
197
- })), w = p(() => {
198
- const t = L.value.map((l) => ({
199
- name: l.name,
200
- color: l.color
201
- })), a = L.value.map((l) => l.value);
202
- return { head: t, body: a };
203
- });
204
- function ie(t = null) {
205
- je(() => {
206
- const a = w.value.head.map((u, h) => [[
207
- u.name
208
- ], [w.value.body[h]], [isNaN(w.value.body[h] / m.value) ? "-" : w.value.body[h] / m.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), s = at(l);
209
- t ? t(s) : ot({ csvContent: s, title: e.value.style.chart.title.text || "vue-ui-galaxy" });
210
- });
211
- }
212
- const V = p(() => {
213
- const t = [
214
- ' <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>',
215
- C({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: m.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
216
- "100%"
217
- ], a = w.value.head.map((u, h) => {
218
- const Re = C({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value.body[h], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
219
- return [
220
- {
221
- color: u.color,
222
- name: u.name
223
- },
224
- Re,
225
- isNaN(w.value.body[h] / m.value) ? "-" : C({
226
- v: w.value.body[h] / m.value * 100,
227
- s: "%",
228
- r: e.value.table.td.roundingPercentage
229
- })
230
- ];
231
- }), l = {
232
- th: {
233
- backgroundColor: e.value.table.th.backgroundColor,
234
- color: e.value.table.th.color,
235
- outline: e.value.table.th.outline
236
- },
237
- td: {
238
- backgroundColor: e.value.table.td.backgroundColor,
239
- color: e.value.table.td.color,
240
- outline: e.value.table.td.outline
241
- },
242
- breakpoint: e.value.table.responsiveBreakpoint
243
- };
244
- return {
245
- colNames: [
246
- e.value.table.columnNames.series,
247
- e.value.table.columnNames.value,
248
- e.value.table.columnNames.percentage
249
- ],
250
- head: t,
251
- body: a,
252
- config: l
253
- };
254
- });
255
- function ce() {
256
- g.value.showTable = !g.value.showTable;
257
- }
258
- function ve() {
259
- g.value.showTooltip = !g.value.showTooltip;
260
- }
261
- const E = n(!1);
262
- function H() {
263
- E.value = !E.value;
264
- }
265
- async function ze({ scale: t = 2 } = {}) {
266
- if (!T.value) return;
267
- const { width: a, height: l } = T.value.getBoundingClientRect(), s = a / l, { imageUri: u, base64: h } = await it({ domElement: T.value, base64: !0, img: !0, scale: t });
268
- return {
269
- imageUri: u,
270
- base64: h,
271
- title: e.value.style.chart.title.text,
272
- width: a,
273
- height: l,
274
- aspectRatio: s
275
- };
276
- }
277
- return Ce({
278
- getData: Me,
279
- getImage: ze,
280
- generatePdf: ae,
281
- generateCsv: ie,
282
- generateImage: oe,
283
- toggleTable: ce,
284
- toggleTooltip: ve,
285
- toggleAnnotator: H,
286
- toggleFullscreen: ue
287
- }), (t, a) => (r(), i("div", {
288
- ref_key: "galaxyChart",
289
- ref: T,
290
- class: B(`vue-ui-galaxy ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
291
- style: M(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
292
- id: `galaxy_${N.value}`,
293
- onMouseenter: a[3] || (a[3] = () => o(K)(!0)),
294
- onMouseleave: a[4] || (a[4] = () => o(K)(!1))
295
- }, [
296
- e.value.userOptions.buttons.annotator ? (r(), x(o(Se), {
297
- key: 0,
298
- svgRef: o(Z),
299
- backgroundColor: e.value.style.chart.backgroundColor,
300
- color: e.value.style.chart.color,
301
- active: E.value,
302
- onClose: H
303
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
304
- Ve.value ? (r(), i("div", dt, null, 512)) : c("", !0),
305
- e.value.style.chart.title.text ? (r(), i("div", ht, [
306
- (r(), x(o(Ne), {
307
- key: `title_${Y.value}`,
308
- config: {
309
- title: {
310
- cy: "galaxy-div-title",
311
- ...e.value.style.chart.title
312
- },
313
- subtitle: {
314
- cy: "galaxy-div-subtitle",
315
- ...e.value.style.chart.title.subtitle
316
- }
317
- }
318
- }, null, 8, ["config"]))
319
- ])) : c("", !0),
320
- e.value.userOptions.show && A.value && (o(Q) || o(R)) ? (r(), x(o(Le), {
321
- ref_key: "details",
322
- ref: Ae,
323
- key: `user_option_${j.value}`,
324
- backgroundColor: e.value.style.chart.backgroundColor,
325
- color: e.value.style.chart.color,
326
- isPrinting: o(te),
327
- isImaging: o(le),
328
- uid: N.value,
329
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
330
- hasPdf: e.value.userOptions.buttons.pdf,
331
- hasXls: e.value.userOptions.buttons.csv,
332
- hasImg: e.value.userOptions.buttons.img,
333
- hasTable: e.value.userOptions.buttons.table,
334
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
335
- isTooltip: g.value.showTooltip,
336
- isFullscreen: O.value,
337
- titles: { ...e.value.userOptions.buttonTitles },
338
- chartElement: T.value,
339
- position: e.value.userOptions.position,
340
- hasAnnotator: e.value.userOptions.buttons.annotator,
341
- isAnnotation: E.value,
342
- callbacks: e.value.userOptions.callbacks,
343
- printScale: e.value.userOptions.print.scale,
344
- onToggleFullscreen: ue,
345
- onGeneratePdf: o(ae),
346
- onGenerateCsv: ie,
347
- onGenerateImage: o(oe),
348
- onToggleTable: ce,
349
- onToggleTooltip: ve,
350
- onToggleAnnotator: H,
351
- style: M({
352
- visibility: o(Q) ? o(R) ? "visible" : "hidden" : "visible"
353
- })
354
- }, He({ _: 2 }, [
355
- t.$slots.menuIcon ? {
356
- name: "menuIcon",
357
- fn: d(({ isOpen: l, color: s }) => [
358
- v(t.$slots, "menuIcon", P(S({ isOpen: l, color: s })), void 0, !0)
359
- ]),
360
- key: "0"
361
- } : void 0,
362
- t.$slots.optionTooltip ? {
363
- name: "optionTooltip",
364
- fn: d(() => [
365
- v(t.$slots, "optionTooltip", {}, void 0, !0)
366
- ]),
367
- key: "1"
368
- } : void 0,
369
- t.$slots.optionPdf ? {
370
- name: "optionPdf",
371
- fn: d(() => [
372
- v(t.$slots, "optionPdf", {}, void 0, !0)
373
- ]),
374
- key: "2"
375
- } : void 0,
376
- t.$slots.optionCsv ? {
377
- name: "optionCsv",
378
- fn: d(() => [
379
- v(t.$slots, "optionCsv", {}, void 0, !0)
380
- ]),
381
- key: "3"
382
- } : void 0,
383
- t.$slots.optionImg ? {
384
- name: "optionImg",
385
- fn: d(() => [
386
- v(t.$slots, "optionImg", {}, void 0, !0)
387
- ]),
388
- key: "4"
389
- } : void 0,
390
- t.$slots.optionTable ? {
391
- name: "optionTable",
392
- fn: d(() => [
393
- v(t.$slots, "optionTable", {}, void 0, !0)
394
- ]),
395
- key: "5"
396
- } : void 0,
397
- t.$slots.optionFullscreen ? {
398
- name: "optionFullscreen",
399
- fn: d(({ toggleFullscreen: l, isFullscreen: s }) => [
400
- v(t.$slots, "optionFullscreen", P(S({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
401
- ]),
402
- key: "6"
403
- } : void 0,
404
- t.$slots.optionAnnotator ? {
405
- name: "optionAnnotator",
406
- fn: d(({ toggleAnnotator: l, isAnnotator: s }) => [
407
- v(t.$slots, "optionAnnotator", P(S({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
408
- ]),
409
- key: "7"
410
- } : void 0
411
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
412
- A.value ? (r(), i("svg", {
413
- key: 4,
414
- ref_key: "svgRef",
415
- ref: Z,
416
- xmlns: o(lt),
417
- class: B({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
418
- viewBox: `0 0 ${F.value.width} ${F.value.height}`,
419
- style: M(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
420
- }, [
421
- de(o(Pe)),
422
- t.$slots["chart-background"] ? (r(), i("foreignObject", {
423
- key: 0,
424
- x: 0,
425
- y: 0,
426
- width: F.value.width,
427
- height: F.value.height,
428
- style: {
429
- pointerEvents: "none"
430
- }
431
- }, [
432
- v(t.$slots, "chart-background", {}, void 0, !0)
433
- ], 8, gt)) : c("", !0),
434
- _("defs", null, [
435
- _("filter", {
436
- id: `blur_${N.value}`,
437
- x: "-50%",
438
- y: "-50%",
439
- width: "200%",
440
- height: "200%"
441
- }, [
442
- _("feGaussianBlur", {
443
- in: "SourceGraphic",
444
- stdDeviation: 100 / e.value.style.chart.layout.arcs.gradient.intensity
445
- }, null, 8, ft)
446
- ], 8, yt)
447
- ]),
448
- (r(!0), i(he, null, pe(L.value, (l) => (r(), i("g", null, [
449
- l.value ? (r(), i("path", {
450
- key: 0,
451
- d: l.path,
452
- fill: "none",
453
- stroke: e.value.style.chart.backgroundColor,
454
- "stroke-width": (e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth) * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
455
- "stroke-linecap": "round"
456
- }, null, 8, bt)) : c("", !0),
457
- l.value ? (r(), i("path", {
458
- key: 1,
459
- d: l.path,
460
- fill: "none",
461
- stroke: l.color,
462
- "stroke-width": e.value.style.chart.layout.arcs.strokeWidth * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
463
- "stroke-linecap": "round",
464
- class: B(`${b.value && b.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
465
- }, null, 10, mt)) : c("", !0),
466
- l.value && e.value.style.chart.layout.arcs.gradient.show ? (r(), i("g", {
467
- key: 2,
468
- filter: `url(#blur_${N.value})`
469
- }, [
470
- _("path", {
471
- d: l.path,
472
- fill: "none",
473
- stroke: e.value.style.chart.layout.arcs.gradient.color,
474
- "stroke-width": e.value.style.chart.layout.arcs.strokeWidth / 2 * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
475
- "stroke-linecap": "round",
476
- class: B(`vue-ui-galaxy-gradient ${b.value && b.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
477
- }, null, 10, wt)
478
- ], 8, kt)) : c("", !0)
479
- ]))), 256)),
480
- (r(!0), i(he, null, pe(L.value, (l, s) => (r(), i("g", null, [
481
- l.value ? (r(), i("path", {
482
- key: 0,
483
- d: l.path,
484
- fill: "none",
485
- stroke: "transparent",
486
- "stroke-width": e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth,
487
- "stroke-linecap": "round",
488
- onMouseenter: (u) => Ge({
489
- datapoint: l,
490
- seriesIndex: l.seriesIndex,
491
- show: !0
492
- }),
493
- onMouseleave: a[0] || (a[0] = (u) => {
494
- D.value = !1, b.value = null;
495
- }),
496
- onClick: (u) => se("selectDatapoint", l)
497
- }, null, 40, Ct)) : c("", !0)
498
- ]))), 256)),
499
- v(t.$slots, "svg", { svg: F.value }, void 0, !0)
500
- ], 14, pt)) : c("", !0),
501
- t.$slots.watermark ? (r(), i("div", $t, [
502
- v(t.$slots, "watermark", P(S({ isPrinting: o(te) || o(le) })), void 0, !0)
503
- ])) : c("", !0),
504
- A.value ? c("", !0) : (r(), x(o(_e), {
505
- key: 6,
506
- config: {
507
- type: "galaxy",
508
- style: {
509
- backgroundColor: e.value.style.chart.backgroundColor,
510
- galaxy: {
511
- color: "#CCCCCC"
512
- }
513
- }
514
- }
515
- }, null, 8, ["config"])),
516
- e.value.style.chart.legend.show ? (r(), x(o(Oe), {
517
- key: `legend_${J.value}`,
518
- legendSet: ne.value,
519
- config: De.value,
520
- onClickMarker: a[1] || (a[1] = ({ legend: l }) => U(l))
521
- }, {
522
- item: d(({ legend: l, index: s }) => [
523
- _("div", {
524
- onClick: (u) => U(l),
525
- style: M(`opacity:${y.value.includes(l.id) ? 0.5 : 1}`)
526
- }, I(l.name) + I(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + I(e.value.style.chart.legend.showValue ? o(be)(
527
- e.value.style.chart.layout.labels.dataLabels.formatter,
528
- l.value,
529
- o(C)({
530
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
531
- v: l.value,
532
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
533
- r: e.value.style.chart.legend.roundingValue
534
- }),
535
- { datapoint: l, seriesIndex: s }
536
- ) : "") + " " + I(e.value.style.chart.legend.showPercentage ? y.value.includes(l.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / m.value) ? "-" : o(C)({
537
- v: l.value / m.value * 100,
538
- s: "%",
539
- r: e.value.style.chart.legend.roundingPercentage
540
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, xt)
541
- ]),
542
- _: 1
543
- }, 8, ["legendSet", "config"])) : c("", !0),
544
- v(t.$slots, "legend", { legend: ne.value }, void 0, !0),
545
- t.$slots.source ? (r(), i("div", Tt, [
546
- v(t.$slots, "source", {}, void 0, !0)
547
- ], 512)) : c("", !0),
548
- de(o(Fe), {
549
- show: g.value.showTooltip && D.value,
550
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
551
- color: e.value.style.chart.tooltip.color,
552
- borderRadius: e.value.style.chart.tooltip.borderRadius,
553
- borderColor: e.value.style.chart.tooltip.borderColor,
554
- borderWidth: e.value.style.chart.tooltip.borderWidth,
555
- fontSize: e.value.style.chart.tooltip.fontSize,
556
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
557
- position: e.value.style.chart.tooltip.position,
558
- offsetY: e.value.style.chart.tooltip.offsetY,
559
- parent: T.value,
560
- content: z.value,
561
- isFullscreen: O.value,
562
- isCustom: o(me)(e.value.style.chart.tooltip.customFormat),
563
- smooth: e.value.style.chart.tooltip.smooth,
564
- backdropFilter: e.value.style.chart.tooltip.backdropFilter
565
- }, {
566
- "tooltip-before": d(() => [
567
- v(t.$slots, "tooltip-before", P(S({ ...W.value })), void 0, !0)
568
- ]),
569
- "tooltip-after": d(() => [
570
- v(t.$slots, "tooltip-after", P(S({ ...W.value })), void 0, !0)
571
- ]),
572
- _: 3
573
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
574
- A.value ? (r(), x(o(xe), {
575
- key: 9,
576
- hideDetails: "",
577
- config: {
578
- open: g.value.showTable,
579
- maxHeight: 1e4,
580
- body: {
581
- backgroundColor: e.value.style.chart.backgroundColor,
582
- color: e.value.style.chart.color
583
- },
584
- head: {
585
- backgroundColor: e.value.style.chart.backgroundColor,
586
- color: e.value.style.chart.color
587
- }
588
- }
589
- }, {
590
- content: d(() => [
591
- (r(), x(o(Te), {
592
- key: `table_${q.value}`,
593
- colNames: V.value.colNames,
594
- head: V.value.head,
595
- body: V.value.body,
596
- config: V.value.config,
597
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
598
- onClose: a[2] || (a[2] = (l) => g.value.showTable = !1)
599
- }, {
600
- th: d(({ th: l }) => [
601
- _("div", {
602
- innerHTML: l,
603
- style: { display: "flex", "align-items": "center" }
604
- }, null, 8, Ot)
605
- ]),
606
- td: d(({ td: l }) => [
607
- Xe(I(l.name || l), 1)
608
- ]),
609
- _: 1
610
- }, 8, ["colNames", "head", "body", "config", "title"]))
611
- ]),
612
- _: 1
613
- }, 8, ["config"])) : c("", !0)
614
- ], 46, vt));
615
- }
616
- }, Et = /* @__PURE__ */ ct(Pt, [["__scopeId", "data-v-a0d640e8"]]);
617
- export {
618
- Et as default
619
- };