vue-data-ui 3.0.0-next.9 → 3.0.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.
Files changed (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.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-Adi9i_-f.js} +43 -37
  15. package/dist/Slicer-t6e1t2iM.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.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-CN_Jh8Hr.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-CjnS13nF.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.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-B7ztqj9-.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
  41. package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
  42. package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
  45. package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
  46. package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
  53. package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
  55. package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
  56. package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
  57. package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
  58. package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
  59. package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
  62. package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
  63. package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
  65. package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
  68. package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
  69. package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
  71. package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
  72. package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
  73. package/dist/vue-ui-rings-BH81WmMS.js +728 -0
  74. package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
  77. package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
  78. package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
  79. package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
  81. package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
  83. package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
  84. package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
  88. package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
  90. package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
  91. package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
  93. package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
  94. package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
  95. package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
  97. package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.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,617 +0,0 @@
1
- import { defineAsyncComponent as k, computed as g, 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 ge, toDisplayString as A, createTextVNode as Xe, nextTick as je } from "vue";
2
- import { u as Ye, o as qe, e as pe, g as Je, c as ye, t as Ke, p as G, a as Qe, b as Ze, G as fe, d as et, M as tt, f as C, X as lt, i as be, x as me, q as at, r as ot, y as st } from "./index-CgShIRes.js";
3
- import { u as ke } from "./useNestedProp-BC4Ciblw.js";
4
- import { u as rt } from "./usePrinter-rIrqBbbm.js";
5
- import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as nt } from "./useChartAccessibility-9icAAmYg.js";
7
- import it from "./img-C_9wps3s.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
- }, gt = ["xmlns", "viewBox"], pt = ["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-hlzscmAS.js")), Te = k(() => import("./DataTable--paavNqF.js")), Oe = k(() => import("./Legend-BZ06qU55.js")), Pe = k(() => import("./PackageVersion-2QvaZf9_.js")), Se = k(() => import("./PenAndPaper-hGgW0EHz.js")), _e = k(() => import("./vue-ui-skeleton-BsBaCvoE.js")), Ne = k(() => import("./Title-B2dA6-uH.js")), Le = k(() => import("./Tooltip-O_hCvqgF.js")), Ie = k(() => import("./UserOptions-Bk03FRqW.js")), { vue_ui_galaxy: Ae } = Ye(), f = we, F = g(() => !!f.dataset && f.dataset.length);
43
- Ue(() => {
44
- X();
45
- });
46
- function X() {
47
- qe(f.dataset) ? pe({
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
- pe({
56
- componentName: "VueUiGalaxy",
57
- type: "datasetSerieAttribute",
58
- property: l,
59
- index: a
60
- });
61
- });
62
- });
63
- }
64
- const N = n(ye()), T = n(null), Fe = n(null), D = n(!1), R = n(""), b = n(null), j = n(0), Y = n(0), q = n(0), J = n(0), e = g({
65
- get: () => ee(),
66
- set: (t) => t
67
- }), { userOptionsVisible: z, 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: Ae
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(), z.value = !e.value.userOptions.showOnChartHover, X(), Y.value += 1, q.value += 1, J.value += 1, p.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, p.value.showTable = e.value.table.show, p.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 = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ee = g(() => Ze(e.value.customPalette)), p = 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
- }), L = 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", I.value.map((a) => ({
101
- name: a.name,
102
- color: a.color,
103
- value: a.value
104
- })));
105
- }
106
- const $ = g(() => 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 = g(() => $.value.filter((t) => !y.value.includes(t.id)).map((t) => t.value).reduce((t, a) => t + a, 0)), Be = n(190), re = g(() => $.value.filter((t) => !y.value.includes(t.id))), I = g(() => {
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
- })) ? R.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>`), R.value = `<div>${u}</div>`);
182
- }
183
- const ne = g(() => $.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 = g(() => ({
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 = g(() => {
198
- const t = I.value.map((l) => ({
199
- name: l.name,
200
- color: l.color
201
- })), a = I.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 = g(() => {
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 ze = 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
- ze,
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
- p.value.showTable = !p.value.showTable;
257
- }
258
- function ve() {
259
- p.value.showTooltip = !p.value.showTooltip;
260
- }
261
- const E = n(!1);
262
- function H() {
263
- E.value = !E.value;
264
- }
265
- async function Re({ 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: Re,
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 && F.value && (o(Q) || o(z)) ? (r(), x(o(Ie), {
321
- ref_key: "details",
322
- ref: Fe,
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: p.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(z) ? "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
- F.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 ${L.value.width} ${L.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: L.value.width,
427
- height: L.value.height,
428
- style: {
429
- pointerEvents: "none"
430
- }
431
- }, [
432
- v(t.$slots, "chart-background", {}, void 0, !0)
433
- ], 8, pt)) : 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, ge(I.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, ge(I.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: L.value }, void 0, !0)
500
- ], 14, gt)) : 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
- F.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
- }, A(l.name) + A(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + A(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
- ) : "") + " " + A(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(Le), {
549
- show: p.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: R.value,
561
- isFullscreen: O.value,
562
- isCustom: o(me)(e.value.style.chart.tooltip.customFormat)
563
- }, {
564
- "tooltip-before": d(() => [
565
- v(t.$slots, "tooltip-before", P(S({ ...W.value })), void 0, !0)
566
- ]),
567
- "tooltip-after": d(() => [
568
- v(t.$slots, "tooltip-after", P(S({ ...W.value })), void 0, !0)
569
- ]),
570
- _: 3
571
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
572
- F.value ? (r(), x(o(xe), {
573
- key: 9,
574
- hideDetails: "",
575
- config: {
576
- open: p.value.showTable,
577
- maxHeight: 1e4,
578
- body: {
579
- backgroundColor: e.value.style.chart.backgroundColor,
580
- color: e.value.style.chart.color
581
- },
582
- head: {
583
- backgroundColor: e.value.style.chart.backgroundColor,
584
- color: e.value.style.chart.color
585
- }
586
- }
587
- }, {
588
- content: d(() => [
589
- (r(), x(o(Te), {
590
- key: `table_${q.value}`,
591
- colNames: V.value.colNames,
592
- head: V.value.head,
593
- body: V.value.body,
594
- config: V.value.config,
595
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
596
- onClose: a[2] || (a[2] = (l) => p.value.showTable = !1)
597
- }, {
598
- th: d(({ th: l }) => [
599
- _("div", {
600
- innerHTML: l,
601
- style: { display: "flex", "align-items": "center" }
602
- }, null, 8, Ot)
603
- ]),
604
- td: d(({ td: l }) => [
605
- Xe(A(l.name || l), 1)
606
- ]),
607
- _: 1
608
- }, 8, ["colNames", "head", "body", "config", "title"]))
609
- ]),
610
- _: 1
611
- }, 8, ["config"])) : c("", !0)
612
- ], 46, vt));
613
- }
614
- }, Et = /* @__PURE__ */ ct(Pt, [["__scopeId", "data-v-de094a3d"]]);
615
- export {
616
- Et as default
617
- };