vue-data-ui 3.0.0-next.25 → 3.0.0-next.27

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 (90) hide show
  1. package/dist/{Arrow-BTsjhHHh.js → Arrow-RGDVmFSH.js} +1 -1
  2. package/dist/{BaseDraggableDialog-7344fBM0.js → BaseDraggableDialog-2MH5hxMc.js} +2 -2
  3. package/dist/{BaseIcon-CDz2oozx.js → BaseIcon-DLJ5Lzvf.js} +1 -1
  4. package/dist/{ColorPicker-BxiEt6Tt.js → ColorPicker-uH4pBeoc.js} +2 -2
  5. package/dist/{DataTable-iAIT4SCP.js → DataTable-DWXGn13M.js} +2 -2
  6. package/dist/{Legend-CyOENTUo.js → Legend-XvLWu-U4.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-CA6KMiGz.js → NonSvgPenAndPaper-DY6-8nWM.js} +3 -3
  8. package/dist/{PackageVersion-BYRaFDzL.js → PackageVersion-CcyOrmqr.js} +1 -1
  9. package/dist/{PenAndPaper-rr8902FN.js → PenAndPaper-S1h1sM_v.js} +3 -3
  10. package/dist/{Shape-CEqtl1VO.js → Shape-B2NNkVEU.js} +1 -1
  11. package/dist/{Slicer-DDzthK35.js → Slicer-C2128jWm.js} +2 -2
  12. package/dist/{SparkTooltip-CtRls3um.js → SparkTooltip-B0IgrAiC.js} +1 -1
  13. package/dist/{Title-B7M9e3sH.js → Title-BT7bS0eb.js} +1 -1
  14. package/dist/{Tooltip-COY92a5-.js → Tooltip-CbaafXw_.js} +1 -1
  15. package/dist/{UserOptions-DK3vsMFd.js → UserOptions-C9lB05jb.js} +2 -2
  16. package/dist/{dom-to-png-D3GALOZU.js → dom-to-png-B5f_cRVB.js} +1 -1
  17. package/dist/{img-CcchoCI6.js → img-BScthXJW.js} +1 -1
  18. package/dist/{index-fJBJ72OC.js → index-DTJkgcxh.js} +341 -337
  19. package/dist/{pdf-DYTZWUjw.js → pdf-DEfty6-G.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +3 -2
  22. package/dist/types/vue-data-ui.d.ts +3 -2
  23. package/dist/{useNestedProp-BliM4SGD.js → useNestedProp-DvwKj8Zn.js} +1 -1
  24. package/dist/{usePrinter-DQuFkOC5.js → usePrinter-CbokYjoB.js} +2 -2
  25. package/dist/{vue-data-ui-C1lvBv6z.js → vue-data-ui-BubXK-EN.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-C3eQe8U7.js → vue-ui-3d-bar-BgbiwMsJ.js} +6 -6
  28. package/dist/{vue-ui-accordion-CsrBV8sH.js → vue-ui-accordion-BDuLBbkX.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-n7sNiWF2.js → vue-ui-age-pyramid-B8esFXAj.js} +6 -6
  30. package/dist/{vue-ui-annotator-DYst7GL2.js → vue-ui-annotator-BM2Fxwyn.js} +2 -2
  31. package/dist/{vue-ui-bullet-Cl2M41Ke.js → vue-ui-bullet-C5r2tlAw.js} +7 -7
  32. package/dist/{vue-ui-candlestick-6jYtO7Vh.js → vue-ui-candlestick-DEqKEVdy.js} +149 -150
  33. package/dist/{vue-ui-carousel-table--F9f6OWZ.js → vue-ui-carousel-table-CHABZSa7.js} +4 -4
  34. package/dist/{vue-ui-chestnut-nZz6MY0E.js → vue-ui-chestnut-CKmXKQ61.js} +5 -5
  35. package/dist/{vue-ui-chord-Dlj-3X51.js → vue-ui-chord-DW2ndivp.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-DhUppMs-.js → vue-ui-circle-pack-BKlgiMRS.js} +6 -6
  37. package/dist/{vue-ui-cursor-D6sHbFHG.js → vue-ui-cursor-BpctNjDR.js} +2 -2
  38. package/dist/{vue-ui-dashboard-DaxbLtod.js → vue-ui-dashboard-C304-EeY.js} +62 -62
  39. package/dist/{vue-ui-digits-D-ujFZF8.js → vue-ui-digits-anpApSWe.js} +2 -2
  40. package/dist/{vue-ui-donut-DORQBhM_.js → vue-ui-donut-JzjQTiDx.js} +8 -8
  41. package/dist/vue-ui-donut-evolution-nQbgWXs5.js +1072 -0
  42. package/dist/{vue-ui-dumbbell-Biush2C5.js → vue-ui-dumbbell-BgnmrlkA.js} +7 -7
  43. package/dist/{vue-ui-flow-DpX0UCZi.js → vue-ui-flow-DEPrQA-w.js} +7 -7
  44. package/dist/{vue-ui-funnel-CP1GlNtS.js → vue-ui-funnel-ojf0srk6.js} +6 -6
  45. package/dist/{vue-ui-galaxy-DfKr6Mae.js → vue-ui-galaxy-CYP_NOuc.js} +5 -5
  46. package/dist/{vue-ui-gauge-BZmrsbJ9.js → vue-ui-gauge-PZkGA3xT.js} +6 -6
  47. package/dist/{vue-ui-gizmo-DU7dxEIZ.js → vue-ui-gizmo-BVEf1l02.js} +3 -3
  48. package/dist/{vue-ui-heatmap-DLeCwx6k.js → vue-ui-heatmap-C0QKWdB2.js} +7 -7
  49. package/dist/{vue-ui-history-plot-BrvUX4gK.js → vue-ui-history-plot-DL6znOA2.js} +7 -7
  50. package/dist/{vue-ui-kpi-s56r373O.js → vue-ui-kpi-k901VoIN.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-jNRdHqeK.js → vue-ui-mini-loader-dO16jdj9.js} +2 -2
  52. package/dist/{vue-ui-molecule-DZUOPeeV.js → vue-ui-molecule-CgBLfrXa.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-CySbOHJ9.js → vue-ui-mood-radar-BxwR2Ez7.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-zmWAssyd.js → vue-ui-nested-donuts-BIjRulQt.js} +9 -9
  55. package/dist/{vue-ui-onion-L_TXtgR4.js → vue-ui-onion-CkoPdA0-.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-BjTfK64F.js → vue-ui-parallel-coordinate-plot-CHQ4Brih.js} +8 -8
  57. package/dist/{vue-ui-quadrant-DndNU61k.js → vue-ui-quadrant-CEQTH_Vf.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-B1RCrld7.js → vue-ui-quick-chart-DIoqKBCM.js} +265 -263
  59. package/dist/{vue-ui-radar-OMddOqeu.js → vue-ui-radar-Cft9wyK8.js} +7 -7
  60. package/dist/{vue-ui-rating-BTFawXu8.js → vue-ui-rating-OARiI9ot.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-CSZUUpA2.js → vue-ui-relation-circle-B-Zb1LQY.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-Hq3omBeT.js → vue-ui-ridgeline-v7NEDfRs.js} +8 -8
  63. package/dist/{vue-ui-rings-CwPNpgCY.js → vue-ui-rings-BQwfTTzr.js} +8 -8
  64. package/dist/{vue-ui-scatter-CtiY2eO5.js → vue-ui-scatter-CHQCbV8M.js} +8 -8
  65. package/dist/{vue-ui-skeleton-Coyylsf1.js → vue-ui-skeleton-CHJxsFpK.js} +3 -3
  66. package/dist/{vue-ui-smiley-CtC16aE_.js → vue-ui-smiley-CsWC9IZ1.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-D51qNzOE.js → vue-ui-spark-trend-BuamubwE.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-BIV0QfYy.js → vue-ui-sparkbar-BHGRAUXV.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-B4ClXnGf.js → vue-ui-sparkgauge-DUnltuDi.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-Dr7IDQTa.js → vue-ui-sparkhistogram-BMedlapo.js} +4 -4
  71. package/dist/{vue-ui-sparkline-BOlHSO6v.js → vue-ui-sparkline-BHNwaMiS.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-D4XwZcKR.js → vue-ui-sparkstackbar-vRQz_uQJ.js} +3 -3
  73. package/dist/{vue-ui-stackbar-4aaZsvIC.js → vue-ui-stackbar-CQ6dTUhn.js} +328 -329
  74. package/dist/{vue-ui-strip-plot-CjqnGufK.js → vue-ui-strip-plot-CO2CPtr7.js} +7 -7
  75. package/dist/{vue-ui-table-CmOvVren.js → vue-ui-table-BLsZesaa.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-DBl2qszz.js → vue-ui-table-heatmap-CGDBekDd.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-CocUmVJB.js → vue-ui-table-sparkline-DDBnNFfS.js} +4 -4
  78. package/dist/{vue-ui-thermometer-BrjOEzEz.js → vue-ui-thermometer-DCgjIlYn.js} +6 -6
  79. package/dist/{vue-ui-timer-B5AaNDZt.js → vue-ui-timer-BUTGgiXL.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-CMhnPzcj.js → vue-ui-tiremarks-Dbwy0DLv.js} +6 -6
  81. package/dist/{vue-ui-treemap-wV1Brun_.js → vue-ui-treemap-fZnaJFLV.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-DkdMEKrJ.js → vue-ui-vertical-bar-CC1RSDNH.js} +9 -9
  83. package/dist/{vue-ui-waffle-D7UqwRa-.js → vue-ui-waffle-yCHIWPVz.js} +8 -8
  84. package/dist/{vue-ui-wheel-G7G2XvoJ.js → vue-ui-wheel-BgCEnXux.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-D04DJczJ.js → vue-ui-word-cloud-DdYN7hGc.js} +6 -6
  86. package/dist/{vue-ui-world-F3toaZ3V.js → vue-ui-world-Drt14jLg.js} +6 -6
  87. package/dist/{vue-ui-xy-DgUQf_Zh.js → vue-ui-xy-E2hScHc-.js} +348 -342
  88. package/dist/{vue-ui-xy-canvas-BEEg7Vs6.js → vue-ui-xy-canvas-DYaSIflg.js} +251 -252
  89. package/package.json +1 -1
  90. package/dist/vue-ui-donut-evolution-CIESyjfI.js +0 -1034
@@ -1,1034 +0,0 @@
1
- import { defineAsyncComponent as V, computed as g, onMounted as Dt, ref as d, toRefs as Ft, nextTick as q, watch as ke, watchEffect as Et, onBeforeUnmount as Vt, createElementBlock as n, openBlock as o, unref as i, normalizeStyle as oe, normalizeClass as N, createBlock as P, createCommentVNode as c, renderSlot as S, createSlots as Rt, withCtx as A, normalizeProps as J, guardReactiveProps as K, createVNode as Bt, createElementVNode as k, Fragment as z, renderList as $, toDisplayString as m, createTextVNode as tt } from "vue";
2
- import { u as Ht, o as lt, e as ue, g as Mt, c as at, A as Ut, t as Xt, p as se, a as Gt, C as ot, b as Wt, d as Ce, G as Yt, D as ut, m as _e, X as jt, s as Q, H as qt, i as we, f as ne, I as Jt, j as Kt, k as Qt, n as st, q as Zt, r as el, J as nt, K as tl } from "./index-fJBJ72OC.js";
3
- import { u as ll } from "./useChartAccessibility-9icAAmYg.js";
4
- import { u as rt } from "./useNestedProp-BliM4SGD.js";
5
- import { u as al } from "./usePrinter-DQuFkOC5.js";
6
- import { u as ol } from "./useTimeLabels-DFkUfjfs.js";
7
- import { u as ul } from "./useUserOptionState-BIvW1Kz7.js";
8
- import { u as sl } from "./useTimeLabelCollider-V7AOiPLB.js";
9
- import nl from "./Legend-CyOENTUo.js";
10
- import { S as rl } from "./Slicer-DDzthK35.js";
11
- import il from "./Title-B7M9e3sH.js";
12
- import cl from "./img-CcchoCI6.js";
13
- import { t as vl } from "./useResponsive-DfdjqQps.js";
14
- import { u as dl, B as hl } from "./BaseScanner-DIK2NTdp.js";
15
- import { _ as yl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
- const fl = ["id"], gl = ["xmlns", "viewBox"], ml = ["x", "y", "width", "height"], bl = ["id"], xl = ["stop-color"], pl = ["stop-color"], kl = ["id"], Cl = ["stop-color"], _l = ["stop-color"], wl = ["stop-color"], Al = { key: 1 }, Ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Sl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zl = { key: 0 }, $l = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Il = ["font-size", "fill", "transform"], Nl = ["x", "y", "font-size", "fill"], Pl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ol = ["x", "y", "font-size", "fill", "font-weight"], Tl = { key: 0 }, Dl = ["text-anchor", "font-size", "fill", "transform"], Fl = ["text-anchor", "font-size", "fill", "transform", "innerHTML"], El = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Vl = { key: 1 }, Rl = ["cx", "cy", "r", "fill"], Bl = { key: 0 }, Hl = { key: 0 }, Ml = ["d", "stroke"], Ul = ["text-anchor", "x", "y", "fill"], Xl = ["cx", "cy", "r", "fill"], Gl = { key: 0 }, Wl = ["cx", "cy", "fill"], Yl = { key: 1 }, jl = ["d", "fill", "stroke"], ql = { key: 2 }, Jl = ["d", "fill", "stroke"], Kl = ["x", "y", "font-size", "fill"], Ql = ["x", "y", "width", "height", "fill"], Zl = ["x", "y", "width", "height", "onMouseenter", "onClick"], ea = {
17
- key: 4,
18
- class: "vue-data-ui-watermark"
19
- }, ta = ["onClick"], la = {
20
- key: 7,
21
- ref: "source",
22
- dir: "auto"
23
- }, aa = { key: 0 }, oa = { key: 1 }, ua = {
24
- __name: "vue-ui-donut-evolution",
25
- props: {
26
- config: {
27
- type: Object,
28
- default() {
29
- return {};
30
- }
31
- },
32
- dataset: {
33
- type: Array,
34
- default() {
35
- return [];
36
- }
37
- }
38
- },
39
- emits: ["selectLegend"],
40
- setup(it, { expose: ct, emit: vt }) {
41
- const dt = V(() => import("./vue-ui-accordion-CsrBV8sH.js")), ht = V(() => import("./BaseDraggableDialog-7344fBM0.js")), yt = V(() => import("./DataTable-iAIT4SCP.js")), ft = V(() => import("./PackageVersion-BYRaFDzL.js")), gt = V(() => import("./PenAndPaper-rr8902FN.js")), mt = V(() => import("./UserOptions-DK3vsMFd.js")), bt = V(() => import("./vue-ui-donut-DORQBhM_.js")), { vue_ui_donut_evolution: xt } = Ht(), b = it, Ae = g(() => !!b.dataset && b.dataset.length);
42
- Dt(() => {
43
- Le();
44
- });
45
- const Z = g(() => !!e.value.debug);
46
- function Le() {
47
- lt(b.dataset) ? (ue({
48
- componentName: "VueUiDonutEvolution",
49
- type: "dataset",
50
- debug: Z.value
51
- }), le.value = !0) : b.dataset.length && b.dataset.forEach((t, a) => {
52
- Mt({
53
- datasetObject: t,
54
- requiredAttributes: ["name", "values"]
55
- }).forEach((l) => {
56
- ue({
57
- componentName: "VueUiDonutEvolution",
58
- type: "datasetSerieAttribute",
59
- property: l,
60
- index: a,
61
- debug: Z.value
62
- }), le.value = !0;
63
- });
64
- }), lt(b.dataset) || (le.value = e.value.loading), he();
65
- }
66
- const R = d(at()), C = d([]), f = d(null), ee = d(null), re = d(!1), F = d(null), B = d(null), pt = d(null), Se = d(0), ze = d(0), $e = d(0), Ie = d(0), Ne = d(0), ie = d(null), te = d(null), ce = d(null), ve = d(null), Pe = vt, e = d(fe()), { loading: Oe, FINAL_DATASET: de, manualLoading: le } = dl({
67
- ...Ft(b),
68
- FINAL_CONFIG: e,
69
- prepareConfig: fe,
70
- callback: () => {
71
- Promise.resolve().then(async () => {
72
- await he();
73
- });
74
- },
75
- skeletonDataset: [
76
- {
77
- name: "",
78
- values: [1, 2, 3, 5, 8, 13],
79
- color: "#AAAAAA"
80
- },
81
- {
82
- name: "",
83
- values: [1, 2, 3, 5, 8, 13],
84
- color: "#BABABA"
85
- },
86
- {
87
- name: "",
88
- values: [1, 2, 3, 5, 8, 13],
89
- color: "#CACACA"
90
- }
91
- ],
92
- skeletonConfig: Ut({
93
- defaultConfig: e.value,
94
- userConfig: {
95
- useCssAnimation: !1,
96
- table: { show: !1 },
97
- userOptions: { show: !1 },
98
- style: {
99
- chart: {
100
- backgroundColor: "#99999930",
101
- layout: {
102
- dataLabels: { show: !1 },
103
- grid: {
104
- stroke: "#6A6A6A",
105
- axis: {
106
- yLabel: "",
107
- xLabel: ""
108
- },
109
- yAxis: {
110
- dataLabels: { show: !1 }
111
- },
112
- xAxis: {
113
- dataLabels: { show: !1 }
114
- }
115
- },
116
- line: {
117
- stroke: "#CACACA60"
118
- }
119
- },
120
- legend: {
121
- backgroundColor: "transparent",
122
- showValue: !1,
123
- showPercentage: !1
124
- },
125
- zoom: {
126
- show: !1,
127
- startIndex: null,
128
- endIndex: null
129
- }
130
- }
131
- }
132
- }
133
- })
134
- }), kt = g(() => Math.max(...de.value.map((t) => t.values.length))), y = d({
135
- start: 0,
136
- end: kt.value
137
- });
138
- function Te() {
139
- he();
140
- }
141
- const H = d(null);
142
- async function he() {
143
- (e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && H.value ? (e.value.style.chart.zoom.startIndex !== null && (await q(), await q(), H.value && H.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await q(), await q(), H.value && H.value.setEndValue(Ct(e.value.style.chart.zoom.endIndex + 1)))) : (y.value = {
144
- start: 0,
145
- end: T.value
146
- }, ze.value += 1);
147
- }
148
- function Ct(t) {
149
- const a = T.value;
150
- return t > a ? a : t < 0 || e.value.style.chart.zoom.startIndex !== null && t < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : t;
151
- }
152
- const { userOptionsVisible: ye, setUserOptionsVisibility: De, keepUserOptionState: Fe } = ul({ config: e.value }), { svgRef: Ee } = ll({ config: e.value.style.chart.title });
153
- function fe() {
154
- const t = rt({
155
- userConfig: b.config,
156
- defaultConfig: xt
157
- });
158
- let a = {};
159
- return t.theme ? a = {
160
- ...rt({
161
- userConfig: Gt.vue_ui_donut_evolution[t.theme] || b.config,
162
- defaultConfig: t
163
- }),
164
- customPalette: Xt[t.theme] || se
165
- } : a = t, b.config && ot(b.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = b.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, b.config && ot(b.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = b.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
166
- }
167
- ke(() => b.config, (t) => {
168
- Oe.value || (e.value = fe()), ye.value = !e.value.userOptions.showOnChartHover, Le(), $e.value += 1, Ie.value += 1, Ne.value += 1, M.value.showTable = e.value.table.show;
169
- }, { deep: !0 }), ke(() => b.dataset, (t) => {
170
- Array.isArray(t) && t.length > 0 && (le.value = !1), Te();
171
- }, { deep: !0 });
172
- const { isPrinting: Ve, isImaging: Re, generatePdf: Be, generateImage: He } = al({
173
- elementId: R.value,
174
- fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
175
- options: e.value.userOptions.print
176
- }), _t = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), wt = g(() => Wt(e.value.customPalette)), M = d({
177
- showTable: e.value.table.show
178
- });
179
- ke(e, () => {
180
- M.value = {
181
- showTable: e.value.table.show
182
- };
183
- }, { immediate: !0 });
184
- const E = g(() => ({
185
- top: e.value.style.chart.layout.padding.top,
186
- right: e.value.style.chart.layout.padding.right,
187
- bottom: e.value.style.chart.layout.padding.bottom,
188
- left: e.value.style.chart.layout.padding.left
189
- }));
190
- function At() {
191
- let t = 0;
192
- ie.value && (t = Array.from(ie.value.querySelectorAll("text")).reduce((u, h) => {
193
- const v = h.getComputedTextLength();
194
- return (v > u ? v : u) + e.value.style.chart.layout.grid.axis.yLabelOffsetX;
195
- }, 0));
196
- const a = ve.value ? ve.value.getBoundingClientRect().width + e.value.style.chart.layout.grid.axis.yLabelOffsetX + e.value.style.chart.layout.grid.axis.fontSize : 0;
197
- return t + a + 5;
198
- }
199
- const ge = d(0), Lt = vl((t) => {
200
- ge.value = t;
201
- }, 100);
202
- Et((t) => {
203
- const a = te.value;
204
- if (!a) return;
205
- const l = new ResizeObserver((s) => {
206
- Lt(s[0].contentRect.height);
207
- });
208
- l.observe(a), t(() => l.disconnect());
209
- }), Vt(() => {
210
- ge.value = 0;
211
- });
212
- const Me = g(() => {
213
- let t = 0;
214
- ce.value && (t = ce.value.getBBox().height);
215
- let a = 0;
216
- return te.value && (a = ge.value), t + a + e.value.style.chart.layout.grid.axis.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY;
217
- }), r = g(() => {
218
- const t = At(), a = e.value.style.chart.layout.dataLabels.fontSize * 3, l = e.value.style.chart.layout.height, s = e.value.style.chart.layout.width, u = E.value.left + t, h = s - E.value.right, v = s - u - E.value.right, x = l - E.value.top - E.value.bottom - a - Me.value, W = E.value.top + a, D = l - E.value.bottom - Me.value;
219
- return {
220
- top: W,
221
- left: u,
222
- right: h,
223
- bottom: D,
224
- absoluteHeight: l,
225
- absoluteWidth: s,
226
- centerX: u + v / 2,
227
- centerY: W + x / 2,
228
- height: x,
229
- width: v
230
- };
231
- }), O = g(() => (de.value.forEach((t, a) => {
232
- [null, void 0].includes(t.name) && ue({
233
- componentName: "VueUiDonutEvolution",
234
- type: "datasetSerieAttribute",
235
- property: "name",
236
- index: a,
237
- debug: Z.value
238
- }), [null, void 0].includes(t.values) && ue({
239
- componentName: "VueUiDonutEvolution",
240
- type: "datasetSerieAttribute",
241
- property: "values",
242
- index: a,
243
- debug: Z.value
244
- });
245
- }), de.value.map((t, a) => ({
246
- ...t,
247
- values: Yt(t.values),
248
- color: Ce(t.color) || wt.value[a] || se[a] || se[a % se.length],
249
- length: (t.values || []).length,
250
- uid: at()
251
- })))), Y = g(() => O.value.filter((t) => !C.value.includes(t.uid)).map((t) => ({
252
- ...t,
253
- values: t.values.filter((a, l) => l >= y.value.start && l <= y.value.end)
254
- }))), T = g(() => Math.max(...Y.value.map((t) => t.length))), _ = g(() => ol({
255
- values: e.value.style.chart.layout.grid.xAxis.dataLabels.values,
256
- maxDatapoints: T.value,
257
- formatter: e.value.style.chart.layout.grid.xAxis.dataLabels.datetimeFormatter,
258
- start: y.value.start,
259
- end: y.value.end
260
- })), p = g(() => r.value.width / (y.value.end - y.value.start)), w = g(() => {
261
- const t = [];
262
- for (let u = 0; u < y.value.end - y.value.start; u += 1) {
263
- const h = Y.value.map((I) => I.values[u] ?? null), v = h.filter((I) => [void 0, null].includes(I)).length === h.length, x = h.reduce((I, L) => I + L, 0), W = h.map((I) => I / x), D = r.value.left + p.value * u + p.value / 2;
264
- t.push({
265
- index: u,
266
- percentages: W,
267
- subtotal: v || x < 0 ? null : x,
268
- values: h,
269
- x: D
270
- });
271
- }
272
- const a = 0, l = Math.max(...t.map((u) => u.subtotal)), s = t.length === 1 ? l * 2 : l;
273
- return t.map((u, h) => {
274
- const v = p.value / 2 * 0.7, x = v > r.value.width / 16 ? r.value.width / 16 : v, W = f.value === u.index ? r.value.width / 16 : x, D = t.length > 4 ? v * 2 : v * 2 > p.value / 2 * 0.7 ? p.value / 2 * 0.7 : v * 2, I = r.value.bottom - r.value.height * u.subtotal / ut(a, s, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
275
- return {
276
- ...u,
277
- y: I,
278
- radius: x,
279
- activeRadius: W,
280
- hoverRadius: D,
281
- donut: _e({
282
- series: Y.value.map((L, et) => ({
283
- color: L.color,
284
- name: L.name,
285
- value: L.values[h] ?? 0
286
- }))
287
- }, u.x, I, x, x, 1.99999, 2, 1, 360, 105.25, x / 2),
288
- donutHover: _e({
289
- series: Y.value.map((L, et) => ({
290
- color: L.color,
291
- name: L.name,
292
- value: L.values[h] ?? 0
293
- }))
294
- }, u.x, I, D, D, 1.99999, 2, 1, 360, 105.25, D / 2),
295
- donutFocus: _e({
296
- series: Y.value.map((L, et) => ({
297
- color: L.color,
298
- name: L.name,
299
- value: L.values[h] ?? 0
300
- }))
301
- }, r.value.centerX, r.value.centerY, r.value.height / 3.6, r.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, r.value.height / 6)
302
- };
303
- });
304
- });
305
- function Ue(t, a, l) {
306
- return we(
307
- e.value.style.chart.layout.dataLabels.formatter,
308
- t,
309
- ne({
310
- p: e.value.style.chart.layout.dataLabels.prefix,
311
- v: t,
312
- s: e.value.style.chart.layout.dataLabels.suffix,
313
- r: e.value.style.chart.layout.dataLabels.rounding
314
- }),
315
- { datapoint: a, index: l }
316
- );
317
- }
318
- const me = g(() => ({
319
- max: Math.max(...w.value.map((t) => t.subtotal)),
320
- min: 0
321
- })), U = g(() => {
322
- const t = w.value.length === 1 ? me.value.max * 2 : me.value.max;
323
- return ut(me.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
324
- });
325
- function St(t) {
326
- return t / U.value.max;
327
- }
328
- const zt = g(() => U.value.ticks.map((t) => ({
329
- y: r.value.bottom - r.value.height * St(t),
330
- value: t
331
- })));
332
- function $t(t, a) {
333
- return isNaN(t.value / nt(a, "value")) ? 0 : (t.value / nt(a, "value") * 100).toFixed(0) + "%";
334
- }
335
- function Xe() {
336
- f.value = null, ee.value = null;
337
- }
338
- function It(t) {
339
- f.value = t.index, ee.value = t;
340
- }
341
- const j = d(null);
342
- function Ge(t, a) {
343
- !t.subtotal || !e.value.style.chart.dialog.show || (ee.value = null, f.value = null, re.value = !0, F.value = t, Ot(t), [null, void 0].includes(a) || (j.value = a));
344
- }
345
- const We = g(() => O.value.map((t, a) => ({
346
- name: t.name,
347
- value: t.values.slice(y.value.start, y.value.end).reduce((l, s) => l + s, 0),
348
- shape: "circle",
349
- uid: t.uid,
350
- color: t.color
351
- })).sort((t, a) => a.value - t.value).map((t) => ({
352
- ...t,
353
- opacity: C.value.includes(t.uid) ? 0.5 : 1,
354
- segregate: () => be(t.uid),
355
- isSegregated: C.value.includes(t.uid)
356
- }))), Ye = g(() => w.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), Nt = g(() => ({
357
- cy: "donut-div-legend",
358
- backgroundColor: e.value.style.chart.legend.backgroundColor,
359
- color: e.value.style.chart.legend.color,
360
- fontSize: e.value.style.chart.legend.fontSize,
361
- paddingBottom: 12,
362
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
363
- }));
364
- function be(t) {
365
- if (C.value.includes(t))
366
- C.value = C.value.filter((a) => a !== t), Pe("selectLegend", null);
367
- else {
368
- if (C.value.length === O.value.length - 1) return;
369
- C.value.push(t), Pe("selectLegend", O.value.find((a) => a.uid === t));
370
- }
371
- F.value && Ge(w.value.find((a, l) => l === j.value));
372
- }
373
- const X = g(() => {
374
- const t = [""].concat(O.value.filter((u) => !C.value.includes(u.uid)).map((u) => ({
375
- name: u.name,
376
- color: u.color
377
- }))).concat(["Σ"]);
378
- let a = [];
379
- for (let u = 0; u < T.value; u += 1) {
380
- const h = O.value.filter((v) => !C.value.includes(v.uid)).map((v) => v.values[u] ?? 0).reduce((v, x) => v + x, 0);
381
- a.push([_[u] ? _[u].text : "-"].concat(O.value.filter((v) => !C.value.includes(v.uid)).map((v) => ({
382
- value: v.values[u] ?? 0,
383
- percentage: v.values[u] ? v.values[u] / h * 100 : 0
384
- }))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(h.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
385
- }
386
- const l = {
387
- th: {
388
- backgroundColor: e.value.table.th.backgroundColor,
389
- color: e.value.table.th.color,
390
- outline: e.value.table.th.outline
391
- },
392
- td: {
393
- backgroundColor: e.value.table.td.backgroundColor,
394
- color: e.value.table.td.color,
395
- outline: e.value.table.td.outline
396
- },
397
- breakpoint: e.value.table.responsiveBreakpoint
398
- }, s = [
399
- e.value.table.columnNames.period
400
- ].concat(O.value.filter((u) => !C.value.includes(u.uid)).map((u) => u.name)).concat(e.value.table.columnNames.total);
401
- return { head: t, body: a, config: l, colNames: s };
402
- });
403
- function Pt() {
404
- return O.value;
405
- }
406
- function je(t = null) {
407
- q(() => {
408
- const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = [...X.value.head.map((v) => v.name ?? v)], s = [...X.value.body.map((v) => v.map((x) => x.value ?? x))], u = a.concat([l]).concat(s), h = Zt(u);
409
- t ? t(h) : el({ csvContent: h, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
410
- });
411
- }
412
- const G = d(!1);
413
- function qe(t) {
414
- G.value = t, Se.value += 1;
415
- }
416
- function Je() {
417
- M.value.showTable = !M.value.showTable;
418
- }
419
- const ae = d(!1);
420
- function xe() {
421
- ae.value = !ae.value;
422
- }
423
- function Ke(t) {
424
- return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
425
- }
426
- const Qe = d([]), Ze = d({}), pe = d(null);
427
- function Ot(t) {
428
- Qe.value = t.donut.map((a) => ({
429
- name: a.name,
430
- values: [a.value],
431
- color: a.color
432
- })), Ze.value = tl({
433
- ...e.value.style.chart.dialog.donutChart,
434
- responsive: !0,
435
- theme: e.value.theme
436
- }), pe.value && pe.value.open();
437
- }
438
- async function Tt({ scale: t = 2 } = {}) {
439
- if (!B.value) return;
440
- const { width: a, height: l } = B.value.getBoundingClientRect(), s = a / l, { imageUri: u, base64: h } = await cl({ domElement: B.value, base64: !0, img: !0, scale: t });
441
- return {
442
- imageUri: u,
443
- base64: h,
444
- title: e.value.style.chart.title.text,
445
- width: a,
446
- height: l,
447
- aspectRatio: s
448
- };
449
- }
450
- return sl({
451
- timeLabelsEls: te,
452
- timeLabels: _,
453
- slicer: y,
454
- configRef: e,
455
- rotationPath: ["style", "chart", "layout", "grid", "xAxis", "dataLabels", "rotation"],
456
- autoRotatePath: ["style", "chart", "layout", "grid", "xAxis", "dataLabels", "autoRotate"],
457
- isAutoSize: !1
458
- }), ct({
459
- getData: Pt,
460
- getImage: Tt,
461
- generatePdf: Be,
462
- generateCsv: je,
463
- generateImage: He,
464
- toggleTable: Je,
465
- toggleAnnotator: xe,
466
- toggleFullscreen: qe
467
- }), (t, a) => (o(), n("div", {
468
- ref_key: "donutEvolutionChart",
469
- ref: B,
470
- class: N(`vue-ui-donut-evolution ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
471
- style: oe(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
472
- id: R.value,
473
- onMouseenter: a[5] || (a[5] = () => i(De)(!0)),
474
- onMouseleave: a[6] || (a[6] = () => i(De)(!1))
475
- }, [
476
- e.value.userOptions.buttons.annotator ? (o(), P(i(gt), {
477
- key: 0,
478
- svgRef: i(Ee),
479
- backgroundColor: e.value.style.chart.backgroundColor,
480
- color: e.value.style.chart.color,
481
- active: ae.value,
482
- onClose: xe
483
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
484
- _t.value ? (o(), n("div", {
485
- key: 1,
486
- ref_key: "noTitle",
487
- ref: pt,
488
- class: "vue-data-ui-no-title-space",
489
- style: "height:36px; width: 100%;background:transparent"
490
- }, null, 512)) : c("", !0),
491
- e.value.style.chart.title.text ? (o(), n("div", {
492
- key: 2,
493
- style: "width:100%;background:transparent;padding-bottom:24px",
494
- onMouseleave: Xe
495
- }, [
496
- (o(), P(il, {
497
- key: `title_${$e.value}`,
498
- config: {
499
- title: {
500
- cy: "donut-evolution-div-title",
501
- ...e.value.style.chart.title
502
- },
503
- subtitle: {
504
- cy: "donut-evolution-div-subtitle",
505
- ...e.value.style.chart.title.subtitle
506
- }
507
- }
508
- }, null, 8, ["config"]))
509
- ], 32)) : c("", !0),
510
- e.value.userOptions.show && Ae.value && (i(Fe) || i(ye)) ? (o(), P(i(mt), {
511
- ref: "details",
512
- key: `user_options_${Se.value}`,
513
- backgroundColor: e.value.style.chart.backgroundColor,
514
- color: e.value.style.chart.color,
515
- isPrinting: i(Ve),
516
- isImaging: i(Re),
517
- uid: R.value,
518
- hasPdf: e.value.userOptions.buttons.pdf,
519
- hasImg: e.value.userOptions.buttons.img,
520
- hasXls: e.value.userOptions.buttons.csv,
521
- hasTable: e.value.userOptions.buttons.table,
522
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
523
- isFullscreen: G.value,
524
- titles: { ...e.value.userOptions.buttonTitles },
525
- chartElement: B.value,
526
- position: e.value.userOptions.position,
527
- hasAnnotator: e.value.userOptions.buttons.annotator,
528
- isAnnotation: ae.value,
529
- callbacks: e.value.userOptions.callbacks,
530
- printScale: e.value.userOptions.print.scale,
531
- onToggleFullscreen: qe,
532
- onGeneratePdf: i(Be),
533
- onGenerateCsv: je,
534
- onGenerateImage: i(He),
535
- onToggleTable: Je,
536
- onToggleAnnotator: xe,
537
- style: oe({
538
- visibility: i(Fe) ? i(ye) ? "visible" : "hidden" : "visible"
539
- })
540
- }, Rt({ _: 2 }, [
541
- t.$slots.menuIcon ? {
542
- name: "menuIcon",
543
- fn: A(({ isOpen: l, color: s }) => [
544
- S(t.$slots, "menuIcon", J(K({ isOpen: l, color: s })), void 0, !0)
545
- ]),
546
- key: "0"
547
- } : void 0,
548
- t.$slots.optionPdf ? {
549
- name: "optionPdf",
550
- fn: A(() => [
551
- S(t.$slots, "optionPdf", {}, void 0, !0)
552
- ]),
553
- key: "1"
554
- } : void 0,
555
- t.$slots.optionCsv ? {
556
- name: "optionCsv",
557
- fn: A(() => [
558
- S(t.$slots, "optionCsv", {}, void 0, !0)
559
- ]),
560
- key: "2"
561
- } : void 0,
562
- t.$slots.optionImg ? {
563
- name: "optionImg",
564
- fn: A(() => [
565
- S(t.$slots, "optionImg", {}, void 0, !0)
566
- ]),
567
- key: "3"
568
- } : void 0,
569
- t.$slots.optionTable ? {
570
- name: "optionTable",
571
- fn: A(() => [
572
- S(t.$slots, "optionTable", {}, void 0, !0)
573
- ]),
574
- key: "4"
575
- } : void 0,
576
- t.$slots.optionFullscreen ? {
577
- name: "optionFullscreen",
578
- fn: A(({ toggleFullscreen: l, isFullscreen: s }) => [
579
- S(t.$slots, "optionFullscreen", J(K({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
580
- ]),
581
- key: "5"
582
- } : void 0,
583
- t.$slots.optionAnnotator ? {
584
- name: "optionAnnotator",
585
- fn: A(({ toggleAnnotator: l, isAnnotator: s }) => [
586
- S(t.$slots, "optionAnnotator", J(K({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
587
- ]),
588
- key: "6"
589
- } : void 0
590
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
591
- (o(), n("svg", {
592
- ref_key: "svgRef",
593
- ref: Ee,
594
- xmlns: i(jt),
595
- class: N({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
596
- viewBox: `0 0 ${r.value.absoluteWidth} ${r.value.absoluteHeight}`,
597
- style: oe(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
598
- }, [
599
- Bt(i(ft)),
600
- t.$slots["chart-background"] ? (o(), n("foreignObject", {
601
- key: 0,
602
- x: r.value.left,
603
- y: r.value.top,
604
- width: r.value.width,
605
- height: r.value.height,
606
- style: {
607
- pointerEvents: "none"
608
- }
609
- }, [
610
- S(t.$slots, "chart-background", {}, void 0, !0)
611
- ], 8, ml)) : c("", !0),
612
- k("defs", null, [
613
- k("linearGradient", {
614
- id: `hover_${R.value}`,
615
- x1: "0%",
616
- y1: "0%",
617
- x2: "0%",
618
- y2: "100%"
619
- }, [
620
- k("stop", {
621
- offset: "0%",
622
- "stop-color": i(Q)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
623
- }, null, 8, xl),
624
- k("stop", {
625
- offset: "100%",
626
- "stop-color": i(Q)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
627
- }, null, 8, pl)
628
- ], 8, bl),
629
- k("radialGradient", {
630
- id: `focus_${R.value}`
631
- }, [
632
- k("stop", {
633
- offset: "0%",
634
- "stop-color": i(Q)(i(Ce)(e.value.style.chart.backgroundColor), 0)
635
- }, null, 8, Cl),
636
- k("stop", {
637
- offset: "77%",
638
- "stop-color": i(Q)("#FFFFFF", 30)
639
- }, null, 8, _l),
640
- k("stop", {
641
- offset: "100%",
642
- "stop-color": i(Q)(i(Ce)(e.value.style.chart.backgroundColor), 0)
643
- }, null, 8, wl)
644
- ], 8, kl)
645
- ]),
646
- e.value.style.chart.layout.grid.show ? (o(), n("g", Al, [
647
- k("line", {
648
- x1: r.value.left,
649
- x2: r.value.left,
650
- y1: r.value.top,
651
- y2: r.value.top + r.value.height,
652
- stroke: e.value.style.chart.layout.grid.stroke,
653
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
654
- "stroke-linecap": "round"
655
- }, null, 8, Ll),
656
- k("line", {
657
- x1: r.value.left,
658
- x2: r.value.right,
659
- y1: r.value.bottom,
660
- y2: r.value.bottom,
661
- stroke: e.value.style.chart.layout.grid.stroke,
662
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
663
- "stroke-linecap": "round"
664
- }, null, 8, Sl),
665
- e.value.style.chart.layout.grid.showVerticalLines ? (o(), n("g", zl, [
666
- (o(!0), n(z, null, $(y.value.end - y.value.start, (l, s) => (o(), n("line", {
667
- x1: r.value.left + (s + 1) * p.value,
668
- x2: r.value.left + (s + 1) * p.value,
669
- y1: r.value.top,
670
- y2: r.value.bottom,
671
- stroke: e.value.style.chart.layout.grid.stroke,
672
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
673
- "stroke-linecap": "round"
674
- }, null, 8, $l))), 256))
675
- ])) : c("", !0)
676
- ])) : c("", !0),
677
- k("g", null, [
678
- e.value.style.chart.layout.grid.axis.yLabel ? (o(), n("text", {
679
- key: 0,
680
- ref_key: "yAxisLabel",
681
- ref: ve,
682
- "font-size": e.value.style.chart.layout.grid.axis.fontSize,
683
- fill: e.value.style.chart.layout.grid.axis.color,
684
- transform: `translate(${e.value.style.chart.layout.grid.axis.fontSize}, ${r.value.top + r.value.height / 2}) rotate(-90)`,
685
- "text-anchor": "middle",
686
- style: { transition: "none" }
687
- }, m(e.value.style.chart.layout.grid.axis.yLabel), 9, Il)) : c("", !0),
688
- e.value.style.chart.layout.grid.axis.xLabel ? (o(), n("text", {
689
- key: 1,
690
- ref_key: "xAxisLabel",
691
- ref: ce,
692
- "text-anchor": "middle",
693
- x: r.value.absoluteWidth / 2,
694
- y: r.value.absoluteHeight - 3,
695
- "font-size": e.value.style.chart.layout.grid.axis.fontSize,
696
- fill: e.value.style.chart.layout.grid.axis.color
697
- }, m(e.value.style.chart.layout.grid.axis.xLabel), 9, Nl)) : c("", !0)
698
- ]),
699
- e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (o(), n("g", {
700
- key: 2,
701
- ref_key: "scaleLabels",
702
- ref: ie,
703
- class: N({ "donut-opacity": !0, "donut-behind": f.value !== null })
704
- }, [
705
- (o(!0), n(z, null, $(zt.value, (l, s) => (o(), n("g", null, [
706
- l.value >= U.value.min && l.value <= U.value.max ? (o(), n("line", {
707
- key: 0,
708
- x1: r.value.left,
709
- x2: r.value.left - 5,
710
- y1: l.y,
711
- y2: l.y,
712
- stroke: e.value.style.chart.layout.grid.stroke,
713
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth
714
- }, null, 8, Pl)) : c("", !0),
715
- l.value >= U.value.min && l.value <= U.value.max ? (o(), n("text", {
716
- key: 1,
717
- x: r.value.left,
718
- y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
719
- "font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
720
- "text-anchor": "end",
721
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
722
- "font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
723
- }, m(i(qt)(l.value) ? i(we)(
724
- e.value.style.chart.layout.dataLabels.formatter,
725
- l.value,
726
- i(ne)({
727
- p: e.value.style.chart.layout.dataLabels.prefix,
728
- v: l.value,
729
- s: e.value.style.chart.layout.dataLabels.suffix,
730
- r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
731
- }),
732
- { datapoint: l, seriesIndex: s }
733
- ) : ""), 9, Ol)) : c("", !0)
734
- ]))), 256))
735
- ], 2)) : c("", !0),
736
- e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (o(), n("g", {
737
- key: 3,
738
- ref_key: "timeLabelsEls",
739
- ref: te,
740
- class: N({ "donut-opacity": !0 })
741
- }, [
742
- (o(!0), n(z, null, $(y.value.end - y.value.start, (l, s) => (o(), n("g", null, [
743
- (e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (s === 0 || s === T.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast) && _.value[s] && _.value[s].text ? (o(), n("g", Tl, [
744
- String(_.value[s].text).includes(`
745
- `) ? (o(), n("text", {
746
- key: 1,
747
- class: "vue-data-ui-time-label",
748
- "text-anchor": e.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
749
- "font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
750
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
751
- transform: `translate(${r.value.left + p.value * s + p.value / 2}, ${r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`,
752
- innerHTML: i(Jt)({
753
- content: String(_.value[s].text),
754
- fontSize: e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
755
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
756
- x: 0,
757
- y: 0
758
- })
759
- }, null, 8, Fl)) : (o(), n("text", {
760
- key: 0,
761
- class: "vue-data-ui-time-label",
762
- "text-anchor": e.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
763
- "font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
764
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
765
- transform: `translate(${r.value.left + p.value * s + p.value / 2}, ${r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
766
- }, m(_.value[s].text || ""), 9, Dl))
767
- ])) : c("", !0)
768
- ]))), 256))
769
- ], 512)) : c("", !0),
770
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("g", null, [
771
- e.value.style.chart.layout.line.show && s < w.value.length - 1 && ![l.subtotal, w.value[s + 1].subtotal].includes(null) ? (o(), n("line", {
772
- key: 0,
773
- class: N({ "donut-opacity": !0, "donut-behind": f.value !== null }),
774
- x1: l.x,
775
- y1: l.y,
776
- x2: w.value[s + 1].x,
777
- y2: w.value[s + 1].y,
778
- stroke: e.value.style.chart.layout.line.stroke,
779
- "stroke-width": e.value.style.chart.layout.line.strokeWidth,
780
- "stroke-linecap": "round",
781
- "stroke-linejoin": "round"
782
- }, null, 10, El)) : c("", !0),
783
- l.subtotal !== null ? (o(), n("g", Vl, [
784
- l.subtotal ? (o(), n("circle", {
785
- key: 0,
786
- cx: l.x,
787
- cy: l.y,
788
- r: l.activeRadius,
789
- fill: e.value.style.chart.backgroundColor
790
- }, null, 8, Rl)) : c("", !0)
791
- ])) : c("", !0)
792
- ]))), 256)),
793
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("g", {
794
- class: N({ "donut-opacity": !0, "donut-behind": s !== f.value && f.value !== null })
795
- }, [
796
- l.subtotal ? (o(), n("g", Bl, [
797
- f.value !== null && f.value === s ? (o(), n("g", Hl, [
798
- (o(!0), n(z, null, $(l.donutHover, (u) => (o(), n("g", null, [
799
- Ke(u) ? (o(), n("path", {
800
- key: 0,
801
- d: i(Kt)(u, { x: u.center.endX, y: u.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
802
- stroke: u.color,
803
- "stroke-width": "1",
804
- "stroke-linecap": "round",
805
- "stroke-linejoin": "round",
806
- fill: "none"
807
- }, null, 8, Ml)) : c("", !0)
808
- ]))), 256)),
809
- (o(!0), n(z, null, $(l.donutHover, (u, h) => (o(), n("g", null, [
810
- Ke(u) ? (o(), n("text", {
811
- key: 0,
812
- "data-cy-hover-label": "",
813
- "text-anchor": i(st)(u, !0, 0).anchor,
814
- x: i(st)(u, !0, 9).x,
815
- y: i(Qt)(u, 14, 10),
816
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
817
- "font-size": 8,
818
- "font-weight": "bold"
819
- }, m(u.name) + ": " + m($t(u, l.donut)) + " (" + m(u.value === null ? "-" : Ue(u.value, u, h)) + ") ", 9, Ul)) : c("", !0)
820
- ]))), 256)),
821
- k("g", null, [
822
- k("circle", {
823
- cx: l.x,
824
- cy: l.y,
825
- r: l.hoverRadius,
826
- fill: e.value.style.chart.backgroundColor
827
- }, null, 8, Xl)
828
- ])
829
- ])) : c("", !0)
830
- ])) : c("", !0)
831
- ], 2))), 256)),
832
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("g", {
833
- class: N({ "donut-opacity": !0, "donut-behind": s !== f.value && f.value !== null })
834
- }, [
835
- l.subtotal !== null ? (o(), n("g", Gl, [
836
- l.subtotal === 0 ? (o(), n("circle", {
837
- key: 0,
838
- cx: l.x,
839
- cy: l.y,
840
- r: 3,
841
- fill: e.value.style.chart.color
842
- }, null, 8, Wl)) : f.value !== null && f.value === s ? (o(), n("g", Yl, [
843
- (o(!0), n(z, null, $(l.donutHover, (u, h) => (o(), n("path", {
844
- d: u.arcSlice,
845
- fill: `${u.color}`,
846
- "stroke-width": 1,
847
- stroke: e.value.style.chart.backgroundColor
848
- }, null, 8, jl))), 256))
849
- ])) : (o(), n("g", ql, [
850
- (o(!0), n(z, null, $(l.donut, (u, h) => (o(), n("path", {
851
- d: u.arcSlice,
852
- fill: `${u.color}`,
853
- "stroke-width": 0.5,
854
- stroke: e.value.style.chart.backgroundColor
855
- }, null, 8, Jl))), 256))
856
- ]))
857
- ])) : c("", !0)
858
- ], 2))), 256)),
859
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("g", {
860
- class: N({ "donut-opacity": !0, "donut-behind": s !== f.value && f.value !== null || re.value && s !== F.value.index })
861
- }, [
862
- l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (o(), n("text", {
863
- key: 0,
864
- "text-anchor": "middle",
865
- x: l.x,
866
- y: f.value === l.index && l.subtotal ? l.y + e.value.style.chart.layout.dataLabels.fontSize / 3 : l.y - l.radius - e.value.style.chart.layout.dataLabels.fontSize + e.value.style.chart.layout.dataLabels.offsetY,
867
- "font-size": e.value.style.chart.layout.dataLabels.fontSize,
868
- "font-weight": "bold",
869
- fill: e.value.style.chart.layout.dataLabels.color
870
- }, m(Ue(l.subtotal, l, s)), 9, Kl)) : c("", !0)
871
- ], 2))), 256)),
872
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("rect", {
873
- x: r.value.left + s * p.value,
874
- y: r.value.top,
875
- width: p.value,
876
- height: r.value.height,
877
- fill: [f.value, j.value].includes(l.index) ? `url(#hover_${R.value})` : "transparent",
878
- class: N({ "donut-hover": l.subtotal && [f.value, j.value].includes(l.index) }),
879
- style: {
880
- pointerEvents: "none"
881
- }
882
- }, null, 10, Ql))), 256)),
883
- (o(!0), n(z, null, $(w.value, (l, s) => (o(), n("rect", {
884
- "data-cy-trap": "",
885
- x: r.value.left + s * p.value,
886
- y: r.value.top,
887
- width: p.value,
888
- height: r.value.height,
889
- fill: "transparent",
890
- onMouseenter: (u) => It(l),
891
- onMouseleave: Xe,
892
- onClick: (u) => Ge(l, s),
893
- class: N({ "donut-hover": f.value === l.index && l.subtotal })
894
- }, null, 42, Zl))), 256)),
895
- S(t.$slots, "svg", { svg: r.value }, void 0, !0)
896
- ], 14, gl)),
897
- t.$slots.watermark ? (o(), n("div", ea, [
898
- S(t.$slots, "watermark", J(K({ isPrinting: i(Ve) || i(Re) })), void 0, !0)
899
- ])) : c("", !0),
900
- T.value > 1 && e.value.style.chart.zoom.show ? (o(), P(rl, {
901
- ref_key: "slicerComponent",
902
- ref: H,
903
- key: `slicer_${ze.value}`,
904
- background: e.value.style.chart.zoom.color,
905
- borderColor: e.value.style.chart.backgroundColor,
906
- fontSize: e.value.style.chart.zoom.fontSize,
907
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
908
- labelLeft: _.value[0] ? _.value[0].text : "",
909
- labelRight: _.value.at(-1) ? _.value.at(-1).text : "",
910
- textColor: e.value.style.chart.color,
911
- inputColor: e.value.style.chart.zoom.color,
912
- selectColor: e.value.style.chart.zoom.highlightColor,
913
- max: T.value,
914
- min: 0,
915
- valueStart: y.value.start,
916
- valueEnd: y.value.end,
917
- start: y.value.start,
918
- "onUpdate:start": a[0] || (a[0] = (l) => y.value.start = l),
919
- end: y.value.end,
920
- "onUpdate:end": a[1] || (a[1] = (l) => y.value.end = l),
921
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
922
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : T.value,
923
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
924
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
925
- onReset: Te
926
- }, {
927
- "reset-action": A(({ reset: l }) => [
928
- S(t.$slots, "reset-action", J(K({ reset: l })), void 0, !0)
929
- ]),
930
- _: 3
931
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : c("", !0),
932
- e.value.style.chart.legend.show ? (o(), P(nl, {
933
- key: `legend_${Ne.value}`,
934
- legendSet: We.value,
935
- config: Nt.value,
936
- onClickMarker: a[2] || (a[2] = ({ legend: l }) => be(l.uid))
937
- }, {
938
- item: A(({ legend: l, index: s }) => [
939
- k("div", {
940
- onClick: (u) => be(l.uid),
941
- style: oe(`opacity:${C.value.includes(l.uid) ? 0.5 : 1}`)
942
- }, m(l.name) + m(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + m(e.value.style.chart.legend.showValue ? i(we)(
943
- e.value.style.chart.layout.dataLabels.formatter,
944
- l.value,
945
- i(ne)({
946
- p: e.value.style.chart.layout.dataLabels.prefix,
947
- v: l.value,
948
- s: e.value.style.chart.layout.dataLabels.suffix,
949
- r: e.value.style.chart.legend.roundingValue
950
- }),
951
- { datapoint: l, seriesIndex: s }
952
- ) : "") + " " + m(e.value.style.chart.legend.showPercentage ? C.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 / Ye.value) ? "-" : i(ne)({
953
- v: l.value / Ye.value * 100,
954
- s: "%",
955
- r: e.value.style.chart.legend.roundingPercentage
956
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, ta)
957
- ]),
958
- _: 1
959
- }, 8, ["legendSet", "config"])) : c("", !0),
960
- S(t.$slots, "legend", { legend: We.value }, void 0, !0),
961
- t.$slots.source ? (o(), n("div", la, [
962
- S(t.$slots, "source", {}, void 0, !0)
963
- ], 512)) : c("", !0),
964
- Ae.value ? (o(), P(i(dt), {
965
- key: 8,
966
- hideDetails: "",
967
- config: {
968
- open: M.value.showTable,
969
- maxHeight: 1e4,
970
- body: {
971
- backgroundColor: e.value.style.chart.backgroundColor,
972
- color: e.value.style.chart.color
973
- },
974
- head: {
975
- backgroundColor: e.value.style.chart.backgroundColor,
976
- color: e.value.style.chart.color
977
- }
978
- }
979
- }, {
980
- content: A(() => [
981
- (o(), P(i(yt), {
982
- key: `table_${Ie.value}`,
983
- colNames: X.value.colNames,
984
- head: X.value.head,
985
- body: X.value.body,
986
- config: X.value.config,
987
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
988
- onClose: a[3] || (a[3] = (l) => M.value.showTable = !1)
989
- }, {
990
- th: A(({ th: l }) => [
991
- tt(m(l.name ?? l), 1)
992
- ]),
993
- td: A(({ td: l }) => [
994
- l.value === null ? (o(), n("span", aa, "-")) : (o(), n("b", oa, m(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.prefix) + m(!isNaN(l.value) && l.value !== null ? Number(l.value.toFixed(e.value.table.td.roundingValue)).toLocaleString() : l) + m(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.suffix), 1)),
995
- k("span", null, m(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
996
- ]),
997
- _: 1
998
- }, 8, ["colNames", "head", "body", "config", "title"]))
999
- ]),
1000
- _: 1
1001
- }, 8, ["config"])) : c("", !0),
1002
- e.value.style.chart.dialog.show ? (o(), P(i(ht), {
1003
- key: 9,
1004
- ref_key: "dialog",
1005
- ref: pe,
1006
- onClose: a[4] || (a[4] = (l) => {
1007
- F.value = null, re.value = !1, ee.value = null, f.value = null, j.value = null;
1008
- }),
1009
- backgroundColor: e.value.style.chart.dialog.backgroundColor,
1010
- color: e.value.style.chart.dialog.color,
1011
- headerBg: e.value.style.chart.dialog.header.backgroundColor,
1012
- headerColor: e.value.style.chart.dialog.header.color,
1013
- isFullscreen: G.value,
1014
- fullscreenParent: B.value
1015
- }, {
1016
- title: A(() => [
1017
- tt(m(_.value[Number(F.value.index)] ? _.value[Number(F.value.index)].text : ""), 1)
1018
- ]),
1019
- default: A(() => [
1020
- F.value ? (o(), P(i(bt), {
1021
- key: 0,
1022
- config: Ze.value,
1023
- dataset: Qe.value
1024
- }, null, 8, ["config", "dataset"])) : c("", !0)
1025
- ]),
1026
- _: 1
1027
- }, 8, ["backgroundColor", "color", "headerBg", "headerColor", "isFullscreen", "fullscreenParent"])) : c("", !0),
1028
- i(Oe) ? (o(), P(hl, { key: 10 })) : c("", !0)
1029
- ], 46, fl));
1030
- }
1031
- }, ka = /* @__PURE__ */ yl(ua, [["__scopeId", "data-v-c2070a04"]]);
1032
- export {
1033
- ka as default
1034
- };