vue-data-ui 3.2.0 → 3.2.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 (135) hide show
  1. package/dist/{PackageVersion-D242JXMq.js → PackageVersion-BB7joYAK.js} +1 -1
  2. package/dist/{Slicer-BgpOhmb6.js → Slicer-qM5l8BsU.js} +119 -119
  3. package/dist/{Title-pI68ZJsq.js → Title-BIaVNiUQ.js} +1 -1
  4. package/dist/components/vue-ui-3d-bar.js +1 -1
  5. package/dist/components/vue-ui-accordion.js +1 -1
  6. package/dist/components/vue-ui-age-pyramid.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dashboard.js +1 -1
  15. package/dist/components/vue-ui-digits.js +1 -1
  16. package/dist/components/vue-ui-donut-evolution.js +1 -1
  17. package/dist/components/vue-ui-donut.js +1 -1
  18. package/dist/components/vue-ui-dumbbell.js +1 -1
  19. package/dist/components/vue-ui-flow.js +1 -1
  20. package/dist/components/vue-ui-funnel.js +1 -1
  21. package/dist/components/vue-ui-galaxy.js +1 -1
  22. package/dist/components/vue-ui-gauge.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-heatmap.js +1 -1
  25. package/dist/components/vue-ui-history-plot.js +1 -1
  26. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  27. package/dist/components/vue-ui-kpi.js +1 -1
  28. package/dist/components/vue-ui-mini-loader.js +1 -1
  29. package/dist/components/vue-ui-molecule.js +1 -1
  30. package/dist/components/vue-ui-mood-radar.js +1 -1
  31. package/dist/components/vue-ui-nested-donuts.js +1 -1
  32. package/dist/components/vue-ui-onion.js +1 -1
  33. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  34. package/dist/components/vue-ui-quadrant.js +1 -1
  35. package/dist/components/vue-ui-quick-chart.js +1 -1
  36. package/dist/components/vue-ui-radar.js +1 -1
  37. package/dist/components/vue-ui-rating.js +1 -1
  38. package/dist/components/vue-ui-relation-circle.js +1 -1
  39. package/dist/components/vue-ui-ridgeline.js +1 -1
  40. package/dist/components/vue-ui-rings.js +1 -1
  41. package/dist/components/vue-ui-scatter.js +1 -1
  42. package/dist/components/vue-ui-skeleton.js +1 -1
  43. package/dist/components/vue-ui-smiley.js +1 -1
  44. package/dist/components/vue-ui-spark-trend.js +1 -1
  45. package/dist/components/vue-ui-sparkbar.js +1 -1
  46. package/dist/components/vue-ui-sparkgauge.js +1 -1
  47. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  48. package/dist/components/vue-ui-sparkline.js +1 -1
  49. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  50. package/dist/components/vue-ui-stackbar.js +1 -1
  51. package/dist/components/vue-ui-strip-plot.js +1 -1
  52. package/dist/components/vue-ui-table-heatmap.js +1 -1
  53. package/dist/components/vue-ui-table-sparkline.js +1 -1
  54. package/dist/components/vue-ui-table.js +1 -1
  55. package/dist/components/vue-ui-thermometer.js +1 -1
  56. package/dist/components/vue-ui-timer.js +1 -1
  57. package/dist/components/vue-ui-tiremarks.js +1 -1
  58. package/dist/components/vue-ui-treemap.js +1 -1
  59. package/dist/components/vue-ui-vertical-bar.js +1 -1
  60. package/dist/components/vue-ui-waffle.js +1 -1
  61. package/dist/components/vue-ui-wheel.js +1 -1
  62. package/dist/components/vue-ui-word-cloud.js +1 -1
  63. package/dist/components/vue-ui-world.js +1 -1
  64. package/dist/components/vue-ui-xy-canvas.js +1 -1
  65. package/dist/components/vue-ui-xy.js +1 -1
  66. package/dist/style.css +1 -1
  67. package/dist/types/vue-data-ui.d.ts +11 -0
  68. package/dist/{useNestedProp-DF7e2h1z.js → useNestedProp-7BbqoAYu.js} +32 -20
  69. package/dist/{vue-data-ui-BQ0WHd6H.js → vue-data-ui-DyqIdFbp.js} +63 -63
  70. package/dist/vue-data-ui.js +64 -64
  71. package/dist/{vue-ui-3d-bar-BNRehnyF.js → vue-ui-3d-bar-BrlJjJDI.js} +3 -3
  72. package/dist/{vue-ui-accordion-D-L73-T2.js → vue-ui-accordion-BSrtaPYx.js} +1 -1
  73. package/dist/{vue-ui-age-pyramid-TVT4PaCQ.js → vue-ui-age-pyramid-BDIMacvP.js} +3 -3
  74. package/dist/{vue-ui-annotator-SoAGIAm-.js → vue-ui-annotator-DGVlVhhy.js} +1 -1
  75. package/dist/{vue-ui-bullet-BQ47U1fM.js → vue-ui-bullet-CIJw4kXd.js} +3 -3
  76. package/dist/{vue-ui-candlestick-DxqNj65Y.js → vue-ui-candlestick-ZjLiyYpC.js} +4 -4
  77. package/dist/{vue-ui-carousel-table-DCenp2Yb.js → vue-ui-carousel-table-_-qalKHa.js} +2 -2
  78. package/dist/{vue-ui-chestnut-CvaTK5g0.js → vue-ui-chestnut-XkX5ANAN.js} +2 -2
  79. package/dist/{vue-ui-chord-BtFHfEyn.js → vue-ui-chord-B1vFXFgp.js} +3 -3
  80. package/dist/{vue-ui-circle-pack-CbwDKath.js → vue-ui-circle-pack-8J10Q6-I.js} +3 -3
  81. package/dist/{vue-ui-cursor-0muOlHSh.js → vue-ui-cursor-CQp6B13J.js} +1 -1
  82. package/dist/{vue-ui-dashboard-BWXIq06l.js → vue-ui-dashboard-CTEYSHVA.js} +63 -63
  83. package/dist/{vue-ui-digits-DOUNtmB0.js → vue-ui-digits-B4aZJw8I.js} +1 -1
  84. package/dist/{vue-ui-donut-75agsMef.js → vue-ui-donut-d_XvnIQB.js} +3 -3
  85. package/dist/{vue-ui-donut-evolution-DCCu-tXT.js → vue-ui-donut-evolution-Bz7fLQru.js} +4 -4
  86. package/dist/{vue-ui-dumbbell-7FKgJlQt.js → vue-ui-dumbbell-fDl24oQq.js} +3 -3
  87. package/dist/{vue-ui-flow-CshaNTgP.js → vue-ui-flow-NYnnPoDX.js} +3 -3
  88. package/dist/{vue-ui-funnel-Xnd-FRVA.js → vue-ui-funnel-BWPIKyW8.js} +3 -3
  89. package/dist/{vue-ui-galaxy-D-MU1xl4.js → vue-ui-galaxy-LabscC7n.js} +3 -3
  90. package/dist/{vue-ui-gauge-NVrFlPvW.js → vue-ui-gauge-DXETakZJ.js} +3 -3
  91. package/dist/{vue-ui-gizmo-zIjavyoS.js → vue-ui-gizmo-DZgMzP_e.js} +2 -2
  92. package/dist/{vue-ui-heatmap-GDVWtrn6.js → vue-ui-heatmap-C6Z5wEkZ.js} +4 -4
  93. package/dist/{vue-ui-history-plot-CxvcqVQY.js → vue-ui-history-plot-CUGzhcjr.js} +3 -3
  94. package/dist/{vue-ui-kpi-D7zdt7-g.js → vue-ui-kpi-DklTxULP.js} +2 -2
  95. package/dist/{vue-ui-mini-loader-CteWqKM_.js → vue-ui-mini-loader-D22vfM5g.js} +1 -1
  96. package/dist/{vue-ui-molecule-CMn9ItPU.js → vue-ui-molecule-BAH7NOZP.js} +2 -2
  97. package/dist/{vue-ui-mood-radar-ClnWru9n.js → vue-ui-mood-radar-DWZKM2u0.js} +3 -3
  98. package/dist/{vue-ui-nested-donuts-DFljgD4E.js → vue-ui-nested-donuts-CxUSyTrT.js} +3 -3
  99. package/dist/{vue-ui-onion-ynotjz5X.js → vue-ui-onion-BfzkGOmQ.js} +3 -3
  100. package/dist/{vue-ui-parallel-coordinate-plot-BS18TbxC.js → vue-ui-parallel-coordinate-plot-Dnl2GBps.js} +3 -3
  101. package/dist/{vue-ui-quadrant-DB5bt4Dh.js → vue-ui-quadrant-C_3l8xWm.js} +3 -3
  102. package/dist/vue-ui-quick-chart-E6QujRg4.js +1892 -0
  103. package/dist/{vue-ui-radar-BfDvRRdJ.js → vue-ui-radar-C_yLoJvR.js} +3 -3
  104. package/dist/{vue-ui-rating-CjoKP6-5.js → vue-ui-rating-Df02iNbL.js} +1 -1
  105. package/dist/{vue-ui-relation-circle-B_j9qaV-.js → vue-ui-relation-circle-CBIXCwQb.js} +3 -3
  106. package/dist/{vue-ui-ridgeline-COAKNQNn.js → vue-ui-ridgeline-euhLcVI0.js} +3 -3
  107. package/dist/{vue-ui-rings-ViCuX090.js → vue-ui-rings-BGxjmMDw.js} +3 -3
  108. package/dist/{vue-ui-scatter-DjtrlQMV.js → vue-ui-scatter-CO4kXKZF.js} +3 -3
  109. package/dist/{vue-ui-skeleton-C7lk4qZ8.js → vue-ui-skeleton-DrCI1AAl.js} +2 -2
  110. package/dist/{vue-ui-smiley-YRRY-yQp.js → vue-ui-smiley-FPLXOxew.js} +1 -1
  111. package/dist/{vue-ui-spark-trend-D2rL-IrB.js → vue-ui-spark-trend-D4dDN0Sc.js} +2 -2
  112. package/dist/{vue-ui-sparkbar-BImswCmL.js → vue-ui-sparkbar-BEXrQvP0.js} +2 -2
  113. package/dist/{vue-ui-sparkgauge-CLS4sHGH.js → vue-ui-sparkgauge-Cp4-BTZu.js} +2 -2
  114. package/dist/{vue-ui-sparkhistogram-DLcoy-5J.js → vue-ui-sparkhistogram-BwmKv4YF.js} +2 -2
  115. package/dist/{vue-ui-sparkline-BlwZF98N.js → vue-ui-sparkline-BXZJ-fUn.js} +2 -2
  116. package/dist/{vue-ui-sparkstackbar-CvlfgjY3.js → vue-ui-sparkstackbar-Cie2g7gk.js} +2 -2
  117. package/dist/{vue-ui-stackbar-JbGg5vfh.js → vue-ui-stackbar-B137wy4q.js} +4 -4
  118. package/dist/{vue-ui-strip-plot-67B5-og6.js → vue-ui-strip-plot-Dd1aHpFW.js} +3 -3
  119. package/dist/{vue-ui-table-DP7udYk-.js → vue-ui-table-CduckNVX.js} +3 -3
  120. package/dist/{vue-ui-table-heatmap-iu6l-6rW.js → vue-ui-table-heatmap-DZAkUjty.js} +1 -1
  121. package/dist/{vue-ui-table-sparkline-kJAE3iUQ.js → vue-ui-table-sparkline-D6oTAFEO.js} +2 -2
  122. package/dist/{vue-ui-thermometer-C_7z6ba0.js → vue-ui-thermometer-BmK3_O7T.js} +3 -3
  123. package/dist/{vue-ui-timer-BKHZtzRY.js → vue-ui-timer-BYw6Z01O.js} +3 -3
  124. package/dist/{vue-ui-tiremarks-CCLFPY-g.js → vue-ui-tiremarks-CWiME7zn.js} +3 -3
  125. package/dist/{vue-ui-treemap-Dw1ygcf6.js → vue-ui-treemap-D8PmfJbw.js} +3 -3
  126. package/dist/{vue-ui-vertical-bar-pLRJQ6-o.js → vue-ui-vertical-bar-DRC047BC.js} +4 -4
  127. package/dist/{vue-ui-waffle-XFGV0gsS.js → vue-ui-waffle-DAaBoyx4.js} +3 -3
  128. package/dist/vue-ui-wheel-DfNXrsTY.js +587 -0
  129. package/dist/{vue-ui-word-cloud-Czs95I-E.js → vue-ui-word-cloud-ByKWZtkV.js} +3 -3
  130. package/dist/{vue-ui-world-DTgxMNzP.js → vue-ui-world-BezpUr_Q.js} +2 -2
  131. package/dist/{vue-ui-xy-Cm3dbAmQ.js → vue-ui-xy-DlcJVA22.js} +415 -415
  132. package/dist/{vue-ui-xy-canvas-Cwiu1ND7.js → vue-ui-xy-canvas-DPfxdanR.js} +5 -5
  133. package/package.json +1 -1
  134. package/dist/vue-ui-quick-chart-Coh62JYO.js +0 -1802
  135. package/dist/vue-ui-wheel-BI7-CsXF.js +0 -380
@@ -1,1802 +0,0 @@
1
- import { defineAsyncComponent as Ce, ref as A, computed as N, toRefs as la, watch as $e, shallowRef as It, onMounted as oa, onBeforeUnmount as Et, nextTick as Tt, watchEffect as na, createElementBlock as o, openBlock as l, normalizeStyle as R, normalizeClass as ce, createBlock as Ie, createCommentVNode as m, createElementVNode as _, createVNode as ke, unref as r, createSlots as ia, withCtx as te, renderSlot as U, normalizeProps as he, guardReactiveProps as fe, toDisplayString as F, Fragment as p, renderList as I, Teleport as ua, mergeProps as et } from "vue";
2
- import { c as ra, t as sa, b as va, p as G, D as He, e as da, L as ca, f as ha, o as fa, h as tt, n as ma, E as Pt, X as ga, u as pa, v as at, w as Ee, a as ae, d as W, N as Rt, W as Mt, q as le, z as qe, A as lt } from "./lib-p5pfHmOX.js";
3
- import { t as Ot, u as xa } from "./useResponsive-DfdjqQps.js";
4
- import { u as ya, a as Ft } from "./useNestedProp-DF7e2h1z.js";
5
- import { u as ka } from "./usePrinter-Yeu5jOfm.js";
6
- import { u as ba } from "./useTimeLabels-BGFjWgrv.js";
7
- import { u as Sa } from "./useChartAccessibility-9icAAmYg.js";
8
- import { u as wa } from "./useTimeLabelCollider-CIsgDrl9.js";
9
- import Aa from "./img-CH7J0fYg.js";
10
- import { S as La } from "./Slicer-BgpOhmb6.js";
11
- import { t as _a } from "./themes-D3cUNuKw.js";
12
- import { u as za, B as Ca } from "./BaseScanner-BgWxam9d.js";
13
- import { _ as $a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const L = {
15
- LINE: "LINE",
16
- BAR: "BAR",
17
- DONUT: "DONUT"
18
- }, Ia = ["SERIE", "SERIES", "DATA", "VALUE", "VALUES", "NUM"];
19
- function Ea({ dataset: h, barLineSwitch: P = 6, debug: S = !0 }) {
20
- let D = null, H = null, ne = 0;
21
- if ((typeof h == "number" || typeof h == "string") && S && console.warn(`The provided dataset (${h}) is not sufficient to build a chart`), Xe(h) && (oe(h) && (h.length < P ? D = L.BAR : D = L.LINE, H = h, ne = h.length), We(h))) {
22
- if (!Pa(h))
23
- return S && console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."), !1;
24
- const je = Object.keys(h[0]), O = Object.values(h[0]);
25
- if (!je.some((M) => Ra(M)))
26
- return S && console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."), !1;
27
- Nt(O, (M) => typeof M == "number") && (D = L.DONUT, H = h), Nt(O, (M) => Array.isArray(M) && oe(M)) && (Dt(h) > P ? D = L.LINE : D = L.BAR, ne = Dt(h), H = h.map((M) => ({
28
- ...M,
29
- data: Ma(M, (Te) => oe(Te))
30
- }))), h = h.map((M) => Bt(M)), H = H.map((M) => Bt(M));
31
- }
32
- return {
33
- dataset: h,
34
- type: D,
35
- usableDataset: H,
36
- maxSeriesLength: ne
37
- };
38
- }
39
- function Ut(h) {
40
- return !h || Xe(h) && !h.length;
41
- }
42
- function Xe(h) {
43
- return Array.isArray(h);
44
- }
45
- function oe(h) {
46
- if (!Xe(h) || Ut(h)) return !1;
47
- const P = h.map((S) => Number(S));
48
- return ![...new Set(P.flatMap((S) => typeof S == "number" && !isNaN(S)))].includes(!1);
49
- }
50
- function We(h) {
51
- return !Xe(h) || Ut(h) || !![...new Set(h.flatMap((S) => typeof S == "object" && !Array.isArray(S)))].includes(!1) ? !1 : !h.map((S) => Object.keys(S).length > 0).includes(!1);
52
- }
53
- function Ta(h, P) {
54
- const S = Object.keys(h).sort(), D = Object.keys(P).sort();
55
- if (S.length !== D.length)
56
- return !1;
57
- for (let H = 0; H < S.length; H += 1) {
58
- const ne = S[H], be = D[H];
59
- if (ne !== be || typeof h[ne] != typeof P[be])
60
- return !1;
61
- }
62
- return !0;
63
- }
64
- function Pa(h) {
65
- if (h.length <= 1) return !0;
66
- for (let P = 0; P < h.length; P += 1)
67
- for (let S = P + 1; S < h.length; S += 1)
68
- if (!Ta(h[P], h[S]))
69
- return !1;
70
- return !0;
71
- }
72
- function Ra(h) {
73
- return Ia.includes(h.toUpperCase());
74
- }
75
- function Nt(h, P) {
76
- let S = [];
77
- for (let D = 0; D < h.length; D += 1)
78
- S.push(P(h[D]));
79
- return S.includes(!0);
80
- }
81
- function Dt(h) {
82
- return Math.max(...[...h].flatMap((P) => Object.values(P).filter((S) => oe(S)).map((S) => S.length)));
83
- }
84
- function Ma(h, P) {
85
- return Object.values(h).filter((S) => P(S))[0];
86
- }
87
- function Bt(h) {
88
- const P = {};
89
- for (let S in h)
90
- h.hasOwnProperty(S) && (P[S.toUpperCase()] = h[S]);
91
- return P;
92
- }
93
- const Oa = ["id"], Fa = ["id"], Na = ["xmlns", "viewBox"], Da = ["x", "y", "width", "height"], Ba = ["x", "y", "width", "height"], Ua = ["width", "height"], Va = ["id"], Ha = ["id"], qa = ["id"], Wa = ["flood-color"], Xa = {
94
- key: 0,
95
- class: "donut-label-connectors"
96
- }, ja = ["d", "stroke", "stroke-width", "filter"], Ga = ["cx", "cy", "r", "fill", "filter"], Ya = { class: "donut" }, Za = ["d", "fill", "stroke", "stroke-width", "filter"], Ja = ["d", "onMouseenter", "onMouseout", "onClick"], Qa = {
97
- key: 1,
98
- class: "donut-labels quick-animation"
99
- }, Ka = ["cx", "cy", "fill", "stroke", "filter"], el = ["text-anchor", "x", "y", "fill", "font-size", "filter"], tl = ["text-anchor", "x", "y", "fill", "font-size", "filter"], al = {
100
- key: 2,
101
- class: "donut-hollow quick-animation"
102
- }, ll = ["x", "y", "font-size", "fill"], ol = ["x", "y", "font-size", "fill"], nl = {
103
- key: 0,
104
- class: "line-grid"
105
- }, il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rl = {
106
- key: 1,
107
- class: "line-axis"
108
- }, sl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], cl = ["x", "y", "font-size", "fill"], hl = {
109
- key: 3,
110
- class: "periodLabels"
111
- }, fl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ml = { key: 0 }, gl = ["font-size", "text-anchor", "fill", "transform"], pl = ["font-size", "text-anchor", "fill", "transform", "innerHTML"], xl = { class: "plots" }, yl = { class: "line-plot-series" }, kl = ["d", "stroke", "stroke-width"], bl = ["d", "stroke", "stroke-width"], Sl = ["d", "stroke", "stroke-width"], wl = ["d", "stroke", "stroke-width"], Al = ["cx", "cy", "fill", "stroke"], Ll = {
112
- key: 4,
113
- class: "dataLabels"
114
- }, _l = ["font-size", "fill", "x", "y"], zl = {
115
- key: 5,
116
- class: "tooltip-traps"
117
- }, Cl = ["x", "y", "height", "width", "fill", "onMouseenter", "onMouseleave", "onClick"], $l = {
118
- key: 0,
119
- class: "line-grid"
120
- }, Il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], El = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tl = {
121
- key: 1,
122
- class: "line-axis"
123
- }, Pl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Rl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ml = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ol = ["x", "y", "font-size", "fill"], Fl = {
124
- key: 3,
125
- class: "periodLabels"
126
- }, Nl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dl = { key: 0 }, Bl = ["font-size", "text-anchor", "fill", "transform"], Ul = ["font-size", "text-anchor", "fill", "transform", "innerHTML"], Vl = { class: "plots" }, Hl = ["x", "width", "height", "y", "fill", "stroke", "stroke-width"], ql = ["to"], Wl = ["from", "to"], Xl = {
127
- key: 4,
128
- class: "dataLabels"
129
- }, jl = ["x", "y", "font-size", "fill"], Gl = {
130
- key: 5,
131
- class: "tooltip-traps"
132
- }, Yl = ["x", "y", "height", "width", "fill", "onMouseenter", "onMouseleave", "onClick"], Zl = {
133
- key: 6,
134
- class: "axis-labels"
135
- }, Jl = ["font-size", "fill", "x", "y"], Ql = ["font-size", "fill", "x", "y"], Kl = ["font-size", "fill", "transform"], eo = ["font-size", "fill", "transform"], to = {
136
- key: 5,
137
- class: "vue-data-ui-watermark"
138
- }, ao = ["id"], lo = ["onClick"], oo = ["onClick"], no = ["onClick"], io = {
139
- key: 1,
140
- class: "vue-ui-quick-chart-not-processable"
141
- }, uo = {
142
- __name: "vue-ui-quick-chart",
143
- props: {
144
- config: {
145
- type: Object,
146
- default() {
147
- return {};
148
- }
149
- },
150
- dataset: {
151
- type: [Array, Object, String, Number],
152
- default() {
153
- return null;
154
- }
155
- }
156
- },
157
- emits: ["selectDatapoint", "selectLegend"],
158
- setup(h, { expose: P, emit: S }) {
159
- const D = Ce(() => import("./BaseIcon-D2f9w5Z5.js")), H = Ce(() => import("./PackageVersion-D242JXMq.js")), ne = Ce(() => import("./PenAndPaper-CtDMyIvW.js")), be = Ce(() => import("./Tooltip-Clf2K3CF.js")), ot = Ce(() => import("./UserOptions-Bn3u4JQu.js")), { vue_ui_quick_chart: je } = ya(), O = h, M = A(null), Te = A(null), nt = A(null), it = A(null), X = A(ra()), re = A(!1), Se = A(null), se = A(""), Z = A(null), ut = A(null), rt = A(null), w = A([]), st = A(0), Pe = A(0), vt = A(!1), J = A(null), Re = A(null), dt = A(null), ct = A(null), Me = A("#FFFFFF"), e = A(Ze()), Ge = N(() => !!e.value.debug), { loading: B, FINAL_DATASET: Vt, manualLoading: ht } = za({
160
- ...la(O),
161
- FINAL_CONFIG: e,
162
- prepareConfig: Ze,
163
- skeletonDataset: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89],
164
- skeletonConfig: sa({
165
- defaultConfig: e.value,
166
- userConfig: {
167
- backgroundColor: "#99999930",
168
- customPalette: ["#BABABA"],
169
- showDataLabels: !1,
170
- paletteStartIndex: 0,
171
- showUserOptions: !1,
172
- showTooltip: !1,
173
- xAxisLabel: "",
174
- yAxisLabel: "",
175
- xyAxisStroke: "#999999",
176
- xyGridStroke: "#99999950",
177
- xyPeriods: [],
178
- xyShowScale: !1,
179
- xyPaddingLeft: 6,
180
- xyPaddingBottom: 12,
181
- zoomXy: !1,
182
- zoomStartIndex: null,
183
- zoomEndIndex: null
184
- }
185
- })
186
- }), { svgRef: ft } = Sa({ config: { text: e.value.title } }), Ht = N(() => e.value.showUserOptionsOnChartHover), mt = N(() => e.value.keepUserOptionsStateOnChartLeave), Oe = A(!e.value.showUserOptionsOnChartHover), Ye = A(!1);
187
- function gt(a = !1) {
188
- Ye.value = a, Ht.value && (Oe.value = a);
189
- }
190
- function Ze() {
191
- const a = Ft({
192
- userConfig: O.config,
193
- defaultConfig: je
194
- });
195
- let c = {};
196
- return a.theme ? c = {
197
- ...Ft({
198
- userConfig: _a.vue_ui_quick_chart[a.theme] || O.config,
199
- defaultConfig: a
200
- }),
201
- customPalette: va[a.theme] || G
202
- } : c = a, O.config && He(O.config, "zoomStartIndex") ? c.zoomStartIndex = O.config.zoomStartIndex : c.zoomStartIndex = null, O.config && He(O.config, "zoomEndIndex") ? c.zoomEndIndex = O.config.zoomEndIndex : c.zoomEndIndex = null, O.config && !He(O.config, "donutStroke") ? He(O.config, "backgroundColor") ? Me.value = O.config.backgroundColor : Me.value = "#FFFFFF" : Me.value = O.config.donutStroke, c;
203
- }
204
- $e(() => O.config, (a) => {
205
- B.value || (e.value = Ze()), b.value.width = e.value.width, b.value.height = e.value.height, Oe.value = !e.value.showUserOptionsOnChartHover, yt(), ge.value.showTooltip = e.value.showTooltip;
206
- }, { deep: !0 }), $e(() => O.dataset, (a) => {
207
- k.value = Ae.value, g.value.start = 0, g.value.end = k.value.maxSeriesLength, Pe.value += 1;
208
- }, { deep: !0 }), $e(() => O.dataset, (a) => {
209
- Array.isArray(a) && a.length > 0 && (ht.value = !1);
210
- }, { immediate: !0 });
211
- const we = N(() => da(e.value.customPalette)), me = S, Ae = N(() => {
212
- const a = Ea({ debug: Ge.value, dataset: ca(Vt.value, [
213
- "serie",
214
- "series",
215
- "data",
216
- "value",
217
- "values",
218
- "num"
219
- ]), barLineSwitch: e.value.chartIsBarUnderDatasetLength });
220
- return !a && Ge.value && console.error("VueUiQuickChart : Dataset is not processable"), a;
221
- }), k = A(Ae.value), qt = N(() => !!k.value), C = N(() => k.value ? k.value.type : null);
222
- $e(() => C.value, (a) => {
223
- a || ha({
224
- componentName: "VueUiQuickChart",
225
- type: "dataset",
226
- debug: Ge.value
227
- });
228
- }, { immediate: !0 });
229
- const { isPrinting: Fe, isImaging: Ne, generatePdf: pt, generateImage: xt } = ka({
230
- elementId: `${C.value}_${X.value}`,
231
- fileName: e.value.title || C.value,
232
- options: e.value.userOptionsPrint
233
- }), Wt = N(() => e.value.showUserOptions && !e.value.title), b = A({
234
- width: e.value.width,
235
- height: e.value.height
236
- }), ge = A({
237
- showTooltip: e.value.showTooltip
238
- });
239
- $e(e, () => {
240
- ge.value = {
241
- showTooltip: e.value.showTooltip
242
- };
243
- }, { immediate: !0 });
244
- const ie = It(null), pe = It(null);
245
- oa(() => {
246
- vt.value = !0, yt();
247
- });
248
- function yt() {
249
- if (fa(O.dataset) || (ht.value = e.value.loading), e.value.responsive) {
250
- const a = Ot(() => {
251
- const { width: c, height: t } = xa({
252
- chart: M.value,
253
- title: e.value.title ? Te.value : null,
254
- legend: e.value.showLegend ? nt.value : null,
255
- slicer: [L.BAR, L.LINE].includes(C.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? it.value : null,
256
- source: ut.value,
257
- noTitle: rt.value
258
- });
259
- requestAnimationFrame(() => {
260
- b.value.width = c, b.value.height = t;
261
- });
262
- });
263
- ie.value && (pe.value && ie.value.unobserve(pe.value), ie.value.disconnect()), ie.value = new ResizeObserver(a), pe.value = M.value.parentNode, ie.value.observe(pe.value);
264
- }
265
- _t();
266
- }
267
- Et(() => {
268
- ie.value && (pe.value && ie.value.unobserve(pe.value), ie.value.disconnect());
269
- });
270
- const Xt = N(() => {
271
- switch (C.value) {
272
- case L.LINE:
273
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
274
- case L.BAR:
275
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
276
- case L.DONUT:
277
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
278
- default:
279
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
280
- }
281
- });
282
- function kt(a) {
283
- return [...a].map((c) => c.value).reduce((c, t) => c + t, 0);
284
- }
285
- function Le(a) {
286
- return e.value.blurOnHover && ![null, void 0].includes(Z.value) && Z.value !== a ? `url(#blur_${X.value})` : "";
287
- }
288
- function bt(a, c) {
289
- w.value.includes(a) ? w.value = w.value.filter((t) => t !== a) : w.value.length < c && w.value.push(a);
290
- }
291
- const St = A(null), wt = A(null), De = A(!1);
292
- function jt(a, c) {
293
- De.value = !0;
294
- let t = a.value;
295
- const i = Ae.value.dataset.find((u, x) => a.id === `donut_${x}`).VALUE;
296
- if (w.value.includes(a.id)) {
297
- let u = function() {
298
- t > i ? (De.value = !1, cancelAnimationFrame(wt.value), k.value = {
299
- ...k.value,
300
- dataset: k.value.dataset.map((x, z) => a.id === `donut_${z}` ? {
301
- ...x,
302
- value: i,
303
- VALUE: i
304
- } : x)
305
- }) : (t += i * 0.025, k.value = {
306
- ...k.value,
307
- dataset: k.value.dataset.map((x, z) => a.id === `donut_${z}` ? {
308
- ...x,
309
- value: t,
310
- VALUE: t
311
- } : x)
312
- }, wt.value = requestAnimationFrame(u));
313
- };
314
- w.value = w.value.filter((x) => x !== a.id), u();
315
- } else if (c.length > 1) {
316
- let u = function() {
317
- t < i / 100 ? (De.value = !1, cancelAnimationFrame(St.value), w.value.push(a.id), k.value = {
318
- ...k.value,
319
- dataset: k.value.dataset.map((x, z) => a.id === `donut_${z}` ? {
320
- ...x,
321
- value: 0,
322
- VALUE: 0
323
- } : x)
324
- }) : (t /= 1.1, k.value = {
325
- ...k.value,
326
- dataset: k.value.dataset.map((x, z) => a.id === `donut_${z}` ? {
327
- ...x,
328
- value: t,
329
- VALUE: t
330
- } : x)
331
- }, St.value = requestAnimationFrame(u));
332
- };
333
- u();
334
- }
335
- }
336
- const Q = A(null);
337
- function Gt(a) {
338
- Q.value = a;
339
- }
340
- const At = N(() => e.value.donutThicknessRatio < 0.01 ? 0.01 : e.value.donutThicknessRatio > 0.4 ? 0.4 : e.value.donutThicknessRatio), T = N(() => {
341
- if (C.value !== L.DONUT) return null;
342
- const a = k.value.dataset.map((f, $) => ({
343
- ...f,
344
- value: f.VALUE || f.DATA || f.SERIE || f.VALUES || f.NUM || 0,
345
- name: f.NAME || f.DESCRIPTION || f.TITLE || f.LABEL || `Serie ${$}`,
346
- id: `donut_${$}`
347
- })).map((f, $) => ({
348
- ...f,
349
- color: f.COLOR ? tt(f.COLOR) : we.value[$ + e.value.paletteStartIndex] || G[$ + e.value.paletteStartIndex] || G[($ + e.value.paletteStartIndex) % G.length],
350
- immutableValue: f.value
351
- }));
352
- function c(f, $) {
353
- return W({
354
- v: isNaN(f.value / kt($)) ? 0 : f.value / kt($) * 100,
355
- s: "%",
356
- r: e.value.dataLabelRoundingPercentage
357
- });
358
- }
359
- function t(f) {
360
- return f.proportion * 100 > e.value.donutHideLabelUnderPercentage;
361
- }
362
- function i(f, $) {
363
- const v = Ae.value.dataset.find((y, E) => `donut_${E}` === f).VALUE;
364
- return Math.abs(String(Number(v.toFixed(0))).length - String(Number($.toFixed(0))).length);
365
- }
366
- function u({ datapoint: f, seriesIndex: $ }) {
367
- Se.value = { datapoint: f, seriesIndex: $, config: e.value, dataset: a }, Z.value = f.id;
368
- const v = e.value.tooltipCustomFormat;
369
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: f, seriesIndex: $ }), qe(v) && lt(() => v({
370
- datapoint: f,
371
- seriesIndex: $,
372
- series: a,
373
- config: e.value
374
- })))
375
- se.value = v({
376
- datapoint: f,
377
- seriesIndex: $,
378
- series: a,
379
- config: e.value
380
- });
381
- else {
382
- let n = "";
383
- n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${f.name}</div>`, n += `<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="${f.color}"/></svg>`, n += `<b>${ae(
384
- e.value.formatter,
385
- f.value,
386
- W({
387
- p: e.value.valuePrefix,
388
- v: f.value,
389
- s: e.value.valueSuffix,
390
- r: e.value.dataLabelRoundingValue
391
- }),
392
- { datapoint: f, seriesIndex: $ }
393
- )}</b>`, n += `<span>(${W({ v: f.proportion * 100, s: "%", r: e.value.dataLabelRoundingPercentage })})</span></div>`, se.value = `<div>${n}</div>`;
394
- }
395
- re.value = !0;
396
- }
397
- function x({ datapoint: f, seriesIndex: $ }) {
398
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: f, seriesIndex: $ }), re.value = !1, Z.value = null, Q.value = null;
399
- }
400
- function z({ datapoint: f, seriesIndex: $ }) {
401
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: f, seriesIndex: $ }), me("selectDatapoint", f);
402
- }
403
- const ue = {
404
- centerX: b.value.width / 2,
405
- centerY: b.value.height / 2
406
- }, j = a.filter((f) => !w.value.includes(f.id)).map((f) => f.value || 0).reduce((f, $) => f + $, 0), ye = a.map((f, $) => ({
407
- ...f,
408
- proportion: (f.value || 0) / j,
409
- value: f.value || 0,
410
- absoluteValue: Ae.value.dataset.find((v, n) => `donut_${n}` === f.id).VALUE
411
- })), ve = b.value.width / 2, K = b.value.height / 2, ee = b.value.height * e.value.donutRadiusRatio;
412
- return {
413
- dataset: ye.filter((f) => !w.value.includes(f.id)),
414
- legend: ye,
415
- drawingArea: ue,
416
- displayArcPercentage: c,
417
- isArcBigEnough: t,
418
- useTooltip: u,
419
- killTooltip: x,
420
- selectDatapoint: z,
421
- getSpaces: i,
422
- total: j,
423
- cx: ve,
424
- cy: K,
425
- radius: ee,
426
- chart: ma(
427
- { series: a.filter((f) => !w.value.includes(f.id)) },
428
- ve,
429
- K,
430
- ee,
431
- ee,
432
- 1.99999,
433
- 2,
434
- 1,
435
- 360,
436
- 105.25,
437
- b.value.height * At.value
438
- )
439
- };
440
- }), g = A({
441
- start: 0,
442
- end: k.value.maxSeriesLength
443
- });
444
- function Yt() {
445
- _t();
446
- }
447
- const Lt = A(null);
448
- async function _t() {
449
- await Tt(), await Tt();
450
- const { zoomStartIndex: a, zoomEndIndex: c } = e.value, t = Lt.value;
451
- (a != null || c != null) && t ? (a != null && t.setStartValue(a), c != null && t.setEndValue(Zt(c + 1))) : (g.value = {
452
- start: 0,
453
- end: k.value.maxSeriesLength
454
- }, Pe.value += 1);
455
- }
456
- function Zt(a) {
457
- const c = k.value.maxSeriesLength;
458
- return a > c ? c : a < 0 || e.value.zoomStartIndex !== null && a < e.value.zoomStartIndex ? e.value.zoomStartIndex !== null ? e.value.zoomStartIndex + 1 : 1 : a;
459
- }
460
- const Jt = N(() => {
461
- if (!e.value.zoomMinimap.show || C.value === L.DONUT) return [];
462
- let a = [];
463
- oe(k.value.dataset) && (a = k.value.dataset), We(k.value.dataset) && (a = k.value.dataset.map((u, x) => ({
464
- values: u.VALUE || u.DATA || u.SERIE || u.SERIES || u.VALUES || u.NUM || 0,
465
- id: C.value === L.LINE ? `line_${x}` : `bar_${x}`
466
- })).filter((u) => !w.value.includes(u.id)));
467
- const c = oe(a) ? a.length : Math.max(...a.map((u) => u.values.length));
468
- let t = [];
469
- if (oe(a))
470
- t = a;
471
- else
472
- for (let u = 0; u < c; u += 1)
473
- t.push(a.map((x) => x.values[u] || 0).reduce((x, z) => (x || 0) + (z || 0), 0));
474
- const i = Math.min(...t);
475
- return t.map((u) => u + (i < 0 ? Math.abs(i) : 0));
476
- });
477
- function zt() {
478
- let a = 0;
479
- return Re.value && (a = Array.from(Re.value.querySelectorAll("text")).reduce((i, u) => {
480
- const x = u.getComputedTextLength();
481
- return x > i ? x : i;
482
- }, 0)), a + 4;
483
- }
484
- const Je = A(0), Qt = Ot((a) => {
485
- Je.value = a;
486
- }, 100);
487
- na((a) => {
488
- const c = J.value;
489
- if (!c) return;
490
- const t = new ResizeObserver((i) => {
491
- Qt(i[0].contentRect.height);
492
- });
493
- t.observe(c), a(() => t.disconnect());
494
- }), Et(() => {
495
- Je.value = 0;
496
- });
497
- const Be = N(() => {
498
- let a = 0, c = 0;
499
- return J.value && (c = Je.value), a + c;
500
- }), d = N(() => {
501
- if (C.value !== L.LINE) return null;
502
- const a = {
503
- height: b.value.height,
504
- width: b.value.width
505
- };
506
- let c = zt();
507
- if (J.value) {
508
- const v = J.value.getBBox().x;
509
- v < 0 && (c += Math.abs(v));
510
- }
511
- const t = {
512
- left: c + e.value.xyPaddingLeft,
513
- top: e.value.xyPaddingTop,
514
- right: a.width - e.value.xyPaddingRight,
515
- bottom: a.height - e.value.xyPaddingBottom - Be.value,
516
- width: Math.max(10, a.width - e.value.xyPaddingLeft - e.value.xyPaddingRight - c),
517
- height: Math.max(10, a.height - e.value.xyPaddingTop - e.value.xyPaddingBottom - Be.value)
518
- };
519
- let i = [];
520
- oe(k.value.dataset) && (i = [
521
- {
522
- values: k.value.dataset.slice(g.value.start, g.value.end),
523
- absoluteValues: k.value.dataset,
524
- absoluteIndices: k.value.dataset.map((v, n) => n).slice(g.value.start, g.value.end),
525
- name: e.value.title,
526
- color: we.value[e.value.paletteStartIndex] || G[e.value.paletteStartIndex],
527
- id: "line_0"
528
- }
529
- ]), We(k.value.dataset) && (i = k.value.dataset.map((v, n) => ({
530
- ...v,
531
- values: v.VALUE || v.DATA || v.SERIE || v.SERIES || v.VALUES || v.NUM || 0,
532
- name: v.NAME || v.DESCRIPTION || v.TITLE || v.LABEL || `Serie ${n}`,
533
- id: `line_${n}`
534
- })).map((v, n) => ({
535
- ...v,
536
- color: v.COLOR ? tt(v.COLOR) : we.value[n + e.value.paletteStartIndex] || G[n + e.value.paletteStartIndex] || G[(n + e.value.paletteStartIndex) % G.length],
537
- values: v.values.slice(g.value.start, g.value.end),
538
- absoluteValues: v.values,
539
- absoluteIndices: v.values.map((y, E) => E).slice(g.value.start, g.value.end)
540
- })));
541
- const u = {
542
- max: Math.max(...i.filter((v) => !w.value.includes(v.id)).flatMap((v) => v.values)),
543
- min: Math.min(...i.filter((v) => !w.value.includes(v.id)).flatMap((v) => v.values)),
544
- maxSeries: Math.max(...i.map((v) => v.values.length))
545
- }, x = Pt(u.min < 0 ? u.min : 0, u.max < 0 ? 0 : u.max, e.value.xyScaleSegments), z = u.min < 0 ? Math.abs(u.min) : 0, ue = u.max < 0 ? t.top : t.bottom - z / (x.max + z) * t.height, j = t.width / u.maxSeries, ye = x.ticks.map((v) => ({
546
- y: t.bottom - t.height * ((v + z) / (x.max + z)),
547
- x: t.left - 8,
548
- value: v
549
- })), ve = i.map((v, n) => ({
550
- ...v,
551
- coordinates: v.values.map((y, E) => ({
552
- x: t.left + j * (E + 1) - j / 2,
553
- y: t.bottom - (y + z) / (x.max + z) * t.height,
554
- value: y
555
- }))
556
- })).map((v) => {
557
- let n = [];
558
- return v.coordinates.forEach((y) => {
559
- n.push(`${y.x},${y.y} `);
560
- }), {
561
- ...v,
562
- linePath: n.join(" ")
563
- };
564
- });
565
- function K(v) {
566
- return i.map((n) => ({
567
- ...n,
568
- value: n.values[v],
569
- absoluteIndex: n.absoluteIndices[v]
570
- })).filter((n) => !w.value.includes(n.id));
571
- }
572
- function ee(v) {
573
- Z.value = v, Q.value = v;
574
- const n = K(v);
575
- Se.value = { datapoint: n, seriesIndex: v, config: e.value, dataset: i };
576
- const y = e.value.tooltipCustomFormat;
577
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: n, seriesIndex: v + g.value.start }), qe(y) && lt(() => y({
578
- datapoint: n,
579
- seriesIndex: v,
580
- series: i,
581
- config: e.value
582
- })))
583
- se.value = y({
584
- datapoint: n,
585
- seriesIndex: v,
586
- series: i,
587
- config: e.value
588
- });
589
- else {
590
- let E = "";
591
- Y.value[n[0].absoluteIndex] && (E += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${Y.value[n[0].absoluteIndex].text}</div>`), n.forEach((V, q) => {
592
- E += `
593
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
594
- <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${V.color}"/></svg>
595
- <span>${V.name}:</span>
596
- <b>${ae(
597
- e.value.formatter,
598
- V.value,
599
- W({
600
- p: e.value.valuePrefix,
601
- v: V.value,
602
- s: e.value.valueSuffix,
603
- r: e.value.dataLabelRoundingValue
604
- }),
605
- { datapoint: V, seriesIndex: q }
606
- )}
607
- </b>
608
- </div>
609
- `;
610
- }), se.value = E;
611
- }
612
- re.value = !0;
613
- }
614
- function f(v) {
615
- const n = K(v);
616
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: n, seriesIndex: v + g.value.start }), Z.value = null, Q.value = null, re.value = !1;
617
- }
618
- function $(v) {
619
- const n = K(v);
620
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: n, seriesIndex: v + g.value.start }), me("selectDatapoint", n);
621
- }
622
- return {
623
- absoluteZero: ue,
624
- dataset: ve.filter((v) => !w.value.includes(v.id)),
625
- legend: ve,
626
- drawingArea: t,
627
- extremes: u,
628
- slotSize: j,
629
- yLabels: ye,
630
- useTooltip: ee,
631
- killTooltip: f,
632
- selectDatapoint: $
633
- };
634
- }), s = N(() => {
635
- if (C.value !== L.BAR) return null;
636
- const a = {
637
- height: b.value.height,
638
- width: b.value.width
639
- };
640
- let c = zt();
641
- if (J.value) {
642
- const n = J.value.getBBox().x;
643
- n < 0 && (c += Math.abs(n));
644
- }
645
- const t = {
646
- left: c + e.value.xyPaddingLeft,
647
- top: e.value.xyPaddingTop,
648
- right: a.width - e.value.xyPaddingRight,
649
- bottom: a.height - e.value.xyPaddingBottom - Be.value,
650
- width: Math.max(10, a.width - e.value.xyPaddingLeft - e.value.xyPaddingRight - c),
651
- height: Math.max(10, a.height - e.value.xyPaddingTop - e.value.xyPaddingBottom - Be.value)
652
- };
653
- let i = [];
654
- oe(k.value.dataset) && (i = [
655
- {
656
- values: k.value.dataset.slice(g.value.start, g.value.end),
657
- absoluteValues: k.value.dataset,
658
- absoluteIndices: k.value.dataset.map((n, y) => y).slice(g.value.start, g.value.end),
659
- name: e.value.title,
660
- color: we.value[e.value.paletteStartIndex] || G[e.value.paletteStartIndex],
661
- id: "bar_0"
662
- }
663
- ]), We(k.value.dataset) && (i = k.value.dataset.map((n, y) => ({
664
- ...n,
665
- values: n.VALUE || n.DATA || n.SERIE || n.SERIES || n.VALUES || n.NUM || 0,
666
- name: n.NAME || n.DESCRIPTION || n.TITLE || n.LABEL || `Serie ${y}`,
667
- id: `bar_${y}`
668
- })).map((n, y) => ({
669
- ...n,
670
- color: n.COLOR ? tt(n.COLOR) : we.value[y + e.value.paletteStartIndex] || G[y + e.value.paletteStartIndex] || G[(y + e.value.paletteStartIndex) % G.length],
671
- values: n.values.slice(g.value.start, g.value.end),
672
- absoluteValues: n.values,
673
- absoluteIndices: n.values.map((E, V) => V).slice(g.value.start, g.value.end)
674
- })));
675
- const u = {
676
- max: Math.max(...i.filter((n) => !w.value.includes(n.id)).flatMap((n) => n.values)) < 0 ? 0 : Math.max(...i.filter((n) => !w.value.includes(n.id)).flatMap((n) => n.values)),
677
- min: Math.min(...i.filter((n) => !w.value.includes(n.id)).flatMap((n) => n.values)),
678
- maxSeries: Math.max(...i.filter((n) => !w.value.includes(n.id)).map((n) => n.values.length))
679
- }, x = Pt(u.min < 0 ? u.min : 0, u.max, e.value.xyScaleSegments), z = x.min < 0 ? Math.abs(x.min) : 0, ue = t.bottom - z / (x.max + z) * t.height, j = t.width / u.maxSeries, ye = x.ticks.map((n) => ({
680
- y: t.bottom - t.height * ((n + z) / (x.max + z)),
681
- x: t.left - 8,
682
- value: n
683
- })), ve = i.map((n, y) => ({
684
- ...n,
685
- coordinates: n.values.map((E, V) => {
686
- const q = (E + z) / (u.max + z) * t.height, _e = Math.abs(E) / Math.abs(u.min) * (t.height - ue), Ke = z / (u.max + z) * t.height, ze = j / i.filter((de) => !w.value.includes(de.id)).length - e.value.barGap / i.filter((de) => !w.value.includes(de.id)).length;
687
- return {
688
- x: t.left + j * V + ze * y + e.value.barGap / 2,
689
- y: E > 0 ? t.bottom - q : ue,
690
- height: E > 0 ? q - Ke : _e,
691
- value: E,
692
- width: ze
693
- };
694
- })
695
- })), K = i.filter((n) => !w.value.includes(n.id)).map((n, y) => ({
696
- ...n,
697
- coordinates: n.values.map((E, V) => {
698
- const q = (E + z) / (u.max + z) * t.height, _e = Math.abs(E) / (u.max + z) * t.height, Ke = z / (u.max + z) * t.height, ze = j / i.filter((de) => !w.value.includes(de.id)).length - e.value.barGap / i.filter((de) => !w.value.includes(de.id)).length;
699
- return {
700
- x: t.left + j * V + ze * y + e.value.barGap / 2,
701
- y: E > 0 ? t.bottom - q : ue,
702
- height: E > 0 ? q - Ke : _e,
703
- value: E,
704
- width: ze
705
- };
706
- })
707
- }));
708
- function ee(n) {
709
- return i.map((y) => ({
710
- ...y,
711
- value: y.values[n],
712
- absoluteIndex: y.absoluteIndices[n]
713
- })).filter((y) => !w.value.includes(y.id));
714
- }
715
- function f(n) {
716
- Z.value = n, Q.value = n;
717
- const y = ee(n);
718
- Se.value = { datapoint: y, seriesIndex: n, config: e.value, dataset: i };
719
- const E = e.value.tooltipCustomFormat;
720
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: y, seriesIndex: n + g.value.start }), qe(E) && lt(() => E({
721
- datapoint: y,
722
- seriesIndex: n,
723
- series: i,
724
- config: e.value
725
- })))
726
- se.value = E({
727
- point: y,
728
- seriesIndex: n,
729
- series: i,
730
- config: e.value
731
- });
732
- else {
733
- let V = "";
734
- Y.value[y[0].absoluteIndex] && (V += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${Y.value[y[0].absoluteIndex].text}</div>`), y.forEach((q, _e) => {
735
- V += `
736
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
737
- <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${q.color}"/></svg>
738
- <span>${q.name}:</span>
739
- <b>${ae(
740
- e.value.formatter,
741
- q.value,
742
- W({
743
- p: e.value.valuePrefix,
744
- v: q.value,
745
- s: e.value.valueSuffix,
746
- r: e.value.dataLabelRoundingValue
747
- }),
748
- { datapoint: q, seriesIndex: _e }
749
- )}
750
- </b>
751
- </div>
752
- `;
753
- }), se.value = V;
754
- }
755
- re.value = !0;
756
- }
757
- function $(n) {
758
- const y = ee(n);
759
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: y, seriesIndex: n + g.value.start }), re.value = !1, Z.value = null, Q.value = null;
760
- }
761
- function v(n) {
762
- const y = ee(n);
763
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: y, seriesIndex: n + g.value.start }), me("selectDatapoint", y);
764
- }
765
- return {
766
- absoluteZero: ue,
767
- dataset: K.filter((n) => !w.value.includes(n.id)),
768
- absoluteDataset: K,
769
- legend: ve,
770
- drawingArea: t,
771
- extremes: u,
772
- slotSize: j,
773
- yLabels: ye,
774
- useTooltip: f,
775
- killTooltip: $,
776
- selectDatapoint: v
777
- };
778
- }), Kt = N(() => {
779
- if (C.value === L.LINE)
780
- return d.value.legend.map((a) => (Math.min(...a.absoluteValues.map((c) => c ?? 0)), {
781
- ...a,
782
- isVisible: !w.value.includes(a.id),
783
- type: "line",
784
- series: a.absoluteValues
785
- }));
786
- if (C.value === L.BAR)
787
- return s.value.absoluteDataset.map((a) => (Math.min(...a.absoluteValues.map((c) => c ?? 0)), {
788
- ...a,
789
- isVisible: !w.value.includes(a.id),
790
- type: "bar",
791
- series: a.absoluteValues
792
- }));
793
- }), Y = N(() => ba({
794
- values: e.value.xyPeriods,
795
- maxDatapoints: k.value.maxSeriesLength,
796
- formatter: e.value.datetimeFormatter,
797
- start: g.value.start,
798
- end: g.value.end
799
- })), xe = N(() => {
800
- const a = e.value.xyPeriodsModulo;
801
- return e.value.xyPeriods.length ? Math.min(a, [...new Set(Y.value.map((c) => c.text))].length) : a;
802
- }), Ue = A(!1);
803
- function Ct(a) {
804
- Ue.value = a, st.value += 1;
805
- }
806
- function $t() {
807
- ge.value.showTooltip = !ge.value.showTooltip;
808
- }
809
- const Ve = A(!1);
810
- function Qe() {
811
- Ve.value = !Ve.value;
812
- }
813
- async function ea({ scale: a = 2 } = {}) {
814
- if (!M.value) return;
815
- const { width: c, height: t } = M.value.getBoundingClientRect(), i = c / t, { imageUri: u, base64: x } = await Aa({ domElement: M.value, base64: !0, img: !0, scale: a });
816
- return {
817
- imageUri: u,
818
- base64: x,
819
- title: e.value.title,
820
- width: c,
821
- height: t,
822
- aspectRatio: i
823
- };
824
- }
825
- const ta = N(() => b.value.width), aa = N(() => b.value.height);
826
- return wa({
827
- timeLabelsEls: J,
828
- timeLabels: Y,
829
- slicer: g,
830
- configRef: e,
831
- rotationPath: ["xyPeriodLabelsRotation"],
832
- autoRotatePath: ["xyPeriodLabelsAutoRotate", "enable"],
833
- isAutoSize: !1,
834
- rotation: e.value.xyPeriodLabelsAutoRotate.angle,
835
- height: aa.value,
836
- width: ta.value
837
- }), P({
838
- getImage: ea,
839
- generatePdf: pt,
840
- generateImage: xt,
841
- toggleTooltip: $t,
842
- toggleAnnotator: Qe,
843
- toggleFullscreen: Ct
844
- }), (a, c) => qt.value ? (l(), o("div", {
845
- key: 0,
846
- id: `${C.value}_${X.value}`,
847
- ref_key: "quickChart",
848
- ref: M,
849
- class: ce({ "vue-ui-quick-chart": !0, "vue-data-ui-wrapper-fullscreen": Ue.value }),
850
- style: R(`background:${e.value.backgroundColor};color:${e.value.color};font-family:${e.value.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
851
- onMouseenter: c[2] || (c[2] = () => gt(!0)),
852
- onMouseleave: c[3] || (c[3] = () => gt(!1))
853
- }, [
854
- e.value.userOptionsButtons.annotator ? (l(), Ie(r(ne), {
855
- key: 0,
856
- svgRef: r(ft),
857
- backgroundColor: e.value.backgroundColor,
858
- color: e.value.color,
859
- active: Ve.value,
860
- onClose: Qe
861
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
862
- Wt.value ? (l(), o("div", {
863
- key: 1,
864
- ref_key: "noTitle",
865
- ref: rt,
866
- class: "vue-data-ui-no-title-space",
867
- style: "height:36px; width: 100%;background:transparent"
868
- }, null, 512)) : m("", !0),
869
- e.value.showUserOptions && (mt.value || Oe.value) ? (l(), Ie(r(ot), {
870
- ref: "details",
871
- key: `user_option_${st.value}`,
872
- backgroundColor: e.value.backgroundColor,
873
- color: e.value.color,
874
- isPrinting: r(Fe),
875
- isImaging: r(Ne),
876
- uid: X.value,
877
- hasTooltip: e.value.userOptionsButtons.tooltip && e.value.showTooltip,
878
- hasPdf: e.value.userOptionsButtons.pdf,
879
- hasImg: e.value.userOptionsButtons.img,
880
- hasFullscreen: e.value.userOptionsButtons.fullscreen,
881
- hasXls: !1,
882
- isTooltip: ge.value.showTooltip,
883
- isFullscreen: Ue.value,
884
- titles: { ...e.value.userOptionsButtonTitles },
885
- chartElement: M.value,
886
- position: e.value.userOptionsPosition,
887
- hasAnnotator: e.value.userOptionsButtons.annotator,
888
- isAnnotation: Ve.value,
889
- callbacks: e.value.userOptionsCallbacks,
890
- printScale: e.value.userOptionsPrint.scale,
891
- onToggleFullscreen: Ct,
892
- onGeneratePdf: r(pt),
893
- onGenerateImage: r(xt),
894
- onToggleTooltip: $t,
895
- onToggleAnnotator: Qe,
896
- style: R({
897
- visibility: mt.value ? Oe.value ? "visible" : "hidden" : "visible"
898
- })
899
- }, ia({ _: 2 }, [
900
- a.$slots.menuIcon ? {
901
- name: "menuIcon",
902
- fn: te(({ isOpen: t, color: i }) => [
903
- U(a.$slots, "menuIcon", he(fe({ isOpen: t, color: i })), void 0, !0)
904
- ]),
905
- key: "0"
906
- } : void 0,
907
- a.$slots.optionTooltip ? {
908
- name: "optionTooltip",
909
- fn: te(() => [
910
- U(a.$slots, "optionTooltip", {}, void 0, !0)
911
- ]),
912
- key: "1"
913
- } : void 0,
914
- a.$slots.optionPdf ? {
915
- name: "optionPdf",
916
- fn: te(() => [
917
- U(a.$slots, "optionPdf", {}, void 0, !0)
918
- ]),
919
- key: "2"
920
- } : void 0,
921
- a.$slots.optionImg ? {
922
- name: "optionImg",
923
- fn: te(() => [
924
- U(a.$slots, "optionImg", {}, void 0, !0)
925
- ]),
926
- key: "3"
927
- } : void 0,
928
- a.$slots.optionFullscreen ? {
929
- name: "optionFullscreen",
930
- fn: te(({ toggleFullscreen: t, isFullscreen: i }) => [
931
- U(a.$slots, "optionFullscreen", he(fe({ toggleFullscreen: t, isFullscreen: i })), void 0, !0)
932
- ]),
933
- key: "4"
934
- } : void 0,
935
- a.$slots.optionAnnotator ? {
936
- name: "optionAnnotator",
937
- fn: te(({ toggleAnnotator: t, isAnnotator: i }) => [
938
- U(a.$slots, "optionAnnotator", he(fe({ toggleAnnotator: t, isAnnotator: i })), void 0, !0)
939
- ]),
940
- key: "5"
941
- } : void 0
942
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
943
- e.value.title ? (l(), o("div", {
944
- key: 3,
945
- ref_key: "quickChartTitle",
946
- ref: Te,
947
- class: "vue-ui-quick-chart-title",
948
- style: R(`background:transparent;color:${e.value.color};font-size:${e.value.titleFontSize}px;font-weight:${e.value.titleBold ? "bold" : "normal"};text-align:${e.value.titleTextAlign}`)
949
- }, F(e.value.title), 5)) : m("", !0),
950
- _("div", {
951
- id: `legend-top-${X.value}`
952
- }, null, 8, Fa),
953
- C.value ? (l(), o("svg", {
954
- key: 4,
955
- ref_key: "svgRef",
956
- ref: ft,
957
- xmlns: r(ga),
958
- viewBox: Xt.value,
959
- style: R(`max-width:100%;overflow:visible;background:transparent;color:${e.value.color}`)
960
- }, [
961
- ke(r(H)),
962
- a.$slots["chart-background"] && C.value === L.BAR ? (l(), o("foreignObject", {
963
- key: 0,
964
- x: s.value.drawingArea.left,
965
- y: s.value.drawingArea.top,
966
- width: s.value.drawingArea.width,
967
- height: s.value.drawingArea.height,
968
- style: {
969
- pointerEvents: "none"
970
- }
971
- }, [
972
- U(a.$slots, "chart-background", {}, void 0, !0)
973
- ], 8, Da)) : m("", !0),
974
- a.$slots["chart-background"] && C.value === L.LINE ? (l(), o("foreignObject", {
975
- key: 1,
976
- x: d.value.drawingArea.left,
977
- y: d.value.drawingArea.top,
978
- width: d.value.drawingArea.width,
979
- height: d.value.drawingArea.height,
980
- style: {
981
- pointerEvents: "none"
982
- }
983
- }, [
984
- U(a.$slots, "chart-background", {}, void 0, !0)
985
- ], 8, Ba)) : m("", !0),
986
- a.$slots["chart-background"] && C.value === L.DONUT ? (l(), o("foreignObject", {
987
- key: 2,
988
- x: 0,
989
- y: 0,
990
- width: b.value.width,
991
- height: b.value.height,
992
- style: {
993
- pointerEvents: "none"
994
- }
995
- }, [
996
- U(a.$slots, "chart-background", {}, void 0, !0)
997
- ], 8, Ua)) : m("", !0),
998
- _("defs", null, [
999
- _("filter", {
1000
- id: `blur_${X.value}`,
1001
- x: "-50%",
1002
- y: "-50%",
1003
- width: "200%",
1004
- height: "200%"
1005
- }, [
1006
- _("feGaussianBlur", {
1007
- in: "SourceGraphic",
1008
- stdDeviation: 2,
1009
- id: `blur_std_${X.value}`
1010
- }, null, 8, Ha),
1011
- c[4] || (c[4] = _("feColorMatrix", {
1012
- type: "saturate",
1013
- values: "0"
1014
- }, null, -1))
1015
- ], 8, Va),
1016
- _("filter", {
1017
- id: `shadow_${X.value}`,
1018
- "color-interpolation-filters": "sRGB"
1019
- }, [
1020
- _("feDropShadow", {
1021
- dx: "0",
1022
- dy: "0",
1023
- stdDeviation: "10",
1024
- "flood-opacity": "0.5",
1025
- "flood-color": e.value.donutShadowColor
1026
- }, null, 8, Wa)
1027
- ], 8, qa)
1028
- ]),
1029
- C.value === L.DONUT ? (l(), o(p, { key: 3 }, [
1030
- e.value.showDataLabels ? (l(), o("g", Xa, [
1031
- (l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o(p, null, [
1032
- T.value.isArcBigEnough(t) ? (l(), o("path", {
1033
- key: 0,
1034
- d: r(pa)(t, { x: b.value.width / 2, y: b.value.height / 2 }, 16, 16, !1, !1, b.value.height * At.value, 12, e.value.donutCurvedMarkers),
1035
- stroke: t.color,
1036
- "stroke-width": e.value.donutLabelMarkerStrokeWidth,
1037
- "stroke-linecap": "round",
1038
- "stroke-linejoin": "round",
1039
- fill: "none",
1040
- filter: Le(t.id)
1041
- }, null, 8, ja)) : m("", !0)
1042
- ], 64))), 256))
1043
- ])) : m("", !0),
1044
- _("circle", {
1045
- cx: T.value.cx,
1046
- cy: T.value.cy,
1047
- r: T.value.radius,
1048
- fill: e.value.backgroundColor,
1049
- filter: e.value.donutUseShadow ? `url(#shadow_${X.value})` : ""
1050
- }, null, 8, Ga),
1051
- _("g", Ya, [
1052
- (l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o("path", {
1053
- d: t.arcSlice,
1054
- fill: t.color,
1055
- stroke: Me.value,
1056
- "stroke-width": e.value.donutStrokeWidth,
1057
- filter: Le(t.id)
1058
- }, null, 8, Za))), 256)),
1059
- (l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o("path", {
1060
- d: t.arcSlice,
1061
- fill: "transparent",
1062
- onMouseenter: (u) => T.value.useTooltip({ datapoint: t, seriesIndex: i }),
1063
- onMouseout: (u) => T.value.killTooltip({ datapoint: t, seriesIndex: i }),
1064
- onClick: (u) => T.value.selectDatapoint({ datapoint: t, seriesIndex: i })
1065
- }, null, 40, Ja))), 256))
1066
- ]),
1067
- e.value.showDataLabels ? (l(), o("g", Qa, [
1068
- (l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o(p, null, [
1069
- T.value.isArcBigEnough(t) ? (l(), o("circle", {
1070
- key: 0,
1071
- cx: r(Ee)(t).x,
1072
- cy: r(at)(t) - 3.7,
1073
- fill: t.color,
1074
- stroke: e.value.backgroundColor,
1075
- "stroke-width": 1,
1076
- r: 3,
1077
- filter: Le(t.id)
1078
- }, null, 8, Ka)) : m("", !0),
1079
- T.value.isArcBigEnough(t) ? (l(), o("text", {
1080
- key: 1,
1081
- "text-anchor": r(Ee)(t, !0, 20).anchor,
1082
- x: r(Ee)(t, !0).x,
1083
- y: r(at)(t),
1084
- fill: e.value.color,
1085
- "font-size": e.value.dataLabelFontSize,
1086
- filter: Le(t.id)
1087
- }, F(T.value.displayArcPercentage(t, T.value.chart)) + " (" + F(r(ae)(
1088
- e.value.formatter,
1089
- t.value,
1090
- r(W)({
1091
- p: e.value.valuePrefix,
1092
- v: t.value,
1093
- s: e.value.valueSuffix,
1094
- r: e.value.dataLabelRoundingValue
1095
- }),
1096
- { datapoint: t, seriesIndex: i }
1097
- )) + ") ", 9, el)) : m("", !0),
1098
- T.value.isArcBigEnough(t, !0, 20) ? (l(), o("text", {
1099
- key: 2,
1100
- "text-anchor": r(Ee)(t).anchor,
1101
- x: r(Ee)(t, !0).x,
1102
- y: r(at)(t) + e.value.dataLabelFontSize,
1103
- fill: e.value.color,
1104
- "font-size": e.value.dataLabelFontSize,
1105
- filter: Le(t.id)
1106
- }, F(t.name), 9, tl)) : m("", !0)
1107
- ], 64))), 256))
1108
- ])) : m("", !0),
1109
- e.value.donutShowTotal ? (l(), o("g", al, [
1110
- _("text", {
1111
- "text-anchor": "middle",
1112
- x: T.value.drawingArea.centerX,
1113
- y: T.value.drawingArea.centerY - e.value.donutTotalLabelFontSize / 2,
1114
- "font-size": e.value.donutTotalLabelFontSize,
1115
- fill: e.value.color
1116
- }, F(e.value.donutTotalLabelText), 9, ll),
1117
- _("text", {
1118
- "text-anchor": "middle",
1119
- x: T.value.drawingArea.centerX,
1120
- y: T.value.drawingArea.centerY + e.value.donutTotalLabelFontSize,
1121
- "font-size": e.value.donutTotalLabelFontSize,
1122
- fill: e.value.color
1123
- }, F(r(W)({
1124
- p: e.value.valuePrefix,
1125
- v: T.value.total,
1126
- s: e.value.valueSuffix,
1127
- r: e.value.dataLabelRoundingValue
1128
- })), 9, ol)
1129
- ])) : m("", !0)
1130
- ], 64)) : m("", !0),
1131
- C.value === L.LINE ? (l(), o(p, { key: 4 }, [
1132
- e.value.xyShowGrid ? (l(), o("g", nl, [
1133
- (l(!0), o(p, null, I(d.value.yLabels, (t) => (l(), o(p, null, [
1134
- t.y <= d.value.drawingArea.bottom ? (l(), o("line", {
1135
- key: 0,
1136
- x1: d.value.drawingArea.left,
1137
- x2: d.value.drawingArea.right,
1138
- y1: t.y,
1139
- y2: t.y,
1140
- stroke: e.value.xyGridStroke,
1141
- "stroke-width": e.value.xyGridStrokeWidth,
1142
- "stroke-linecap": "round"
1143
- }, null, 8, il)) : m("", !0)
1144
- ], 64))), 256)),
1145
- (l(!0), o(p, null, I(d.value.extremes.maxSeries + 1, (t, i) => (l(), o("line", {
1146
- x1: d.value.drawingArea.left + d.value.slotSize * i,
1147
- x2: d.value.drawingArea.left + d.value.slotSize * i,
1148
- y1: d.value.drawingArea.top,
1149
- y2: d.value.drawingArea.bottom,
1150
- stroke: e.value.xyGridStroke,
1151
- "stroke-width": e.value.xyGridStrokeWidth,
1152
- "stroke-linecap": "round"
1153
- }, null, 8, ul))), 256))
1154
- ])) : m("", !0),
1155
- e.value.xyShowAxis ? (l(), o("g", rl, [
1156
- _("line", {
1157
- x1: d.value.drawingArea.left,
1158
- x2: d.value.drawingArea.left,
1159
- y1: d.value.drawingArea.top,
1160
- y2: d.value.drawingArea.bottom,
1161
- stroke: e.value.xyAxisStroke,
1162
- "stroke-width": e.value.xyAxisStrokeWidth,
1163
- "stroke-linecap": "round"
1164
- }, null, 8, sl),
1165
- _("line", {
1166
- x1: d.value.drawingArea.left,
1167
- x2: d.value.drawingArea.right,
1168
- y1: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
1169
- y2: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
1170
- stroke: e.value.xyAxisStroke,
1171
- "stroke-width": e.value.xyAxisStrokeWidth,
1172
- "stroke-linecap": "round"
1173
- }, null, 8, vl)
1174
- ])) : m("", !0),
1175
- e.value.xyShowScale ? (l(), o("g", {
1176
- key: 2,
1177
- class: "yLabels",
1178
- ref_key: "scaleLabels",
1179
- ref: Re
1180
- }, [
1181
- (l(!0), o(p, null, I(d.value.yLabels, (t, i) => (l(), o(p, null, [
1182
- t.y <= d.value.drawingArea.bottom ? (l(), o("line", {
1183
- key: 0,
1184
- x1: t.x + 4,
1185
- x2: d.value.drawingArea.left,
1186
- y1: t.y,
1187
- y2: t.y,
1188
- stroke: e.value.xyAxisStroke,
1189
- "stroke-width": e.value.xyAxisStrokeWidth,
1190
- "stroke-linecap": "round"
1191
- }, null, 8, dl)) : m("", !0),
1192
- t.y <= d.value.drawingArea.bottom ? (l(), o("text", {
1193
- key: 1,
1194
- x: t.x,
1195
- y: t.y + e.value.xyLabelsYFontSize / 3,
1196
- "text-anchor": "end",
1197
- "font-size": e.value.xyLabelsYFontSize,
1198
- fill: e.value.color
1199
- }, F(r(ae)(
1200
- e.value.formatter,
1201
- t.value,
1202
- r(W)({
1203
- p: e.value.valuePrefix,
1204
- v: t.value,
1205
- s: e.value.valueSuffix,
1206
- r: e.value.dataLabelRoundingValue
1207
- }),
1208
- { datapoint: t, seriesIndex: i }
1209
- )), 9, cl)) : m("", !0)
1210
- ], 64))), 256))
1211
- ], 512)) : m("", !0),
1212
- e.value.xyShowScale && e.value.xyPeriods.length ? (l(), o("g", hl, [
1213
- (l(!0), o(p, null, I(Y.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
1214
- !e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((g.value.end - g.value.start) / xe.value) === 0 || g.value.end - g.value.start <= xe.value ? (l(), o("line", {
1215
- key: 0,
1216
- x1: d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2,
1217
- x2: d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2,
1218
- y1: d.value.drawingArea.bottom,
1219
- y2: d.value.drawingArea.bottom + 4,
1220
- stroke: e.value.xyAxisStroke,
1221
- "stroke-width": e.value.xyAxisStrokeWidth,
1222
- "stroke-linecap": "round"
1223
- }, null, 8, fl)) : m("", !0)
1224
- ], 64))), 256)),
1225
- _("g", {
1226
- ref_key: "timeLabelsEls",
1227
- ref: J
1228
- }, [
1229
- (l(!0), o(p, null, I(Y.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
1230
- !e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((g.value.end - g.value.start) / xe.value) === 0 || g.value.end - g.value.start <= xe.value ? (l(), o("g", ml, [
1231
- String(t).includes(`
1232
- `) ? (l(), o("text", {
1233
- key: 1,
1234
- class: "vue-data-ui-time-label",
1235
- "font-size": e.value.xyLabelsXFontSize,
1236
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1237
- fill: e.value.color,
1238
- transform: `translate(${d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2}, ${d.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`,
1239
- innerHTML: r(Rt)({
1240
- content: String(t),
1241
- fontSize: e.value.xyLabelsXFontSize,
1242
- fill: e.value.color,
1243
- x: 0,
1244
- y: 0
1245
- })
1246
- }, null, 8, pl)) : (l(), o("text", {
1247
- key: 0,
1248
- class: "vue-data-ui-time-label",
1249
- "font-size": e.value.xyLabelsXFontSize,
1250
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1251
- fill: e.value.color,
1252
- transform: `translate(${d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2}, ${d.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`
1253
- }, F(t), 9, gl))
1254
- ])) : m("", !0)
1255
- ], 64))), 256))
1256
- ], 512)
1257
- ])) : m("", !0),
1258
- _("g", xl, [
1259
- (l(!0), o(p, null, I(d.value.dataset, (t, i) => (l(), o("g", yl, [
1260
- e.value.lineSmooth ? (l(), o(p, { key: 0 }, [
1261
- _("path", {
1262
- d: `M ${r(Mt)(t.coordinates)}`,
1263
- stroke: e.value.backgroundColor,
1264
- "stroke-width": e.value.lineStrokeWidth + 1,
1265
- "stroke-linecap": "round",
1266
- fill: "none",
1267
- class: ce({ "quick-animation": !r(B), "vue-data-ui-line-animated": e.value.lineAnimated && !r(B) }),
1268
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1269
- }, null, 14, kl),
1270
- _("path", {
1271
- d: `M ${r(Mt)(t.coordinates)}`,
1272
- stroke: t.color,
1273
- "stroke-width": e.value.lineStrokeWidth,
1274
- "stroke-linecap": "round",
1275
- fill: "none",
1276
- class: ce({ "quick-animation": !r(B), "vue-data-ui-line-animated": e.value.lineAnimated && !r(B) }),
1277
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1278
- }, null, 14, bl)
1279
- ], 64)) : (l(), o(p, { key: 1 }, [
1280
- _("path", {
1281
- d: `M ${t.linePath}`,
1282
- stroke: e.value.backgroundColor,
1283
- "stroke-width": e.value.lineStrokeWidth + 1,
1284
- "stroke-linecap": "round",
1285
- fill: "none",
1286
- class: ce({ "quick-animation": !r(B), "vue-data-ui-line-animated": e.value.lineAnimated && !r(B) }),
1287
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1288
- }, null, 14, Sl),
1289
- _("path", {
1290
- d: `M ${t.linePath}`,
1291
- stroke: t.color,
1292
- "stroke-width": e.value.lineStrokeWidth,
1293
- "stroke-linecap": "round",
1294
- fill: "none",
1295
- class: ce({ "quick-animation": !r(B), "vue-data-ui-line-animated": e.value.lineAnimated && !r(B) }),
1296
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1297
- }, null, 14, wl)
1298
- ], 64)),
1299
- (l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("circle", {
1300
- cx: u.x,
1301
- cy: r(le)(u.y),
1302
- r: 3,
1303
- fill: t.color,
1304
- stroke: e.value.backgroundColor,
1305
- "stroke-width": "0.5",
1306
- class: ce({ "quick-animation": !r(B) }),
1307
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1308
- }, null, 14, Al))), 256))
1309
- ]))), 256))
1310
- ]),
1311
- e.value.showDataLabels ? (l(), o("g", Ll, [
1312
- (l(!0), o(p, null, I(d.value.dataset, (t, i) => (l(), o(p, null, [
1313
- (l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("text", {
1314
- "text-anchor": "middle",
1315
- "font-size": e.value.dataLabelFontSize,
1316
- fill: t.color,
1317
- x: u.x,
1318
- y: r(le)(u.y) - e.value.dataLabelFontSize / 2,
1319
- class: "quick-animation",
1320
- style: R({ transition: r(B) ? void 0 : "all 0.3s ease-in-out" })
1321
- }, F(r(ae)(
1322
- e.value.formatter,
1323
- r(le)(u.value),
1324
- r(W)({
1325
- p: e.value.valuePrefix,
1326
- v: r(le)(u.value),
1327
- s: e.value.valueSuffix,
1328
- r: e.value.dataLabelRoundingValue
1329
- }),
1330
- { datapoint: u, seriesIndex: x }
1331
- )), 13, _l))), 256))
1332
- ], 64))), 256))
1333
- ])) : m("", !0),
1334
- Ye.value ? (l(), o("g", zl, [
1335
- (l(!0), o(p, null, I(d.value.extremes.maxSeries, (t, i) => (l(), o("rect", {
1336
- x: d.value.drawingArea.left + i * d.value.slotSize,
1337
- y: d.value.drawingArea.top,
1338
- height: d.value.drawingArea.height <= 0 ? 1e-5 : d.value.drawingArea.height,
1339
- width: d.value.slotSize <= 0 ? 1e-5 : d.value.slotSize,
1340
- fill: [Z.value, Q.value].includes(i) ? e.value.xyHighlighterColor : "transparent",
1341
- style: R(`opacity:${e.value.xyHighlighterOpacity}`),
1342
- onMouseenter: (u) => d.value.useTooltip(i),
1343
- onMouseleave: (u) => d.value.killTooltip(i),
1344
- onClick: (u) => d.value.selectDatapoint(i)
1345
- }, null, 44, Cl))), 256))
1346
- ])) : m("", !0)
1347
- ], 64)) : m("", !0),
1348
- C.value === L.BAR ? (l(), o(p, { key: 5 }, [
1349
- e.value.xyShowGrid ? (l(), o("g", $l, [
1350
- (l(!0), o(p, null, I(s.value.yLabels, (t) => (l(), o(p, null, [
1351
- t.y <= s.value.drawingArea.bottom ? (l(), o("line", {
1352
- key: 0,
1353
- x1: s.value.drawingArea.left,
1354
- x2: s.value.drawingArea.right,
1355
- y1: t.y,
1356
- y2: t.y,
1357
- stroke: e.value.xyGridStroke,
1358
- "stroke-width": e.value.xyGridStrokeWidth,
1359
- "stroke-linecap": "round"
1360
- }, null, 8, Il)) : m("", !0)
1361
- ], 64))), 256)),
1362
- (l(!0), o(p, null, I(s.value.extremes.maxSeries + 1, (t, i) => (l(), o("line", {
1363
- x1: s.value.drawingArea.left + s.value.slotSize * i,
1364
- x2: s.value.drawingArea.left + s.value.slotSize * i,
1365
- y1: s.value.drawingArea.top,
1366
- y2: s.value.drawingArea.bottom,
1367
- stroke: e.value.xyGridStroke,
1368
- "stroke-width": e.value.xyGridStrokeWidth,
1369
- "stroke-linecap": "round"
1370
- }, null, 8, El))), 256))
1371
- ])) : m("", !0),
1372
- e.value.xyShowAxis ? (l(), o("g", Tl, [
1373
- _("line", {
1374
- x1: s.value.drawingArea.left,
1375
- x2: s.value.drawingArea.left,
1376
- y1: s.value.drawingArea.top,
1377
- y2: s.value.drawingArea.bottom,
1378
- stroke: e.value.xyAxisStroke,
1379
- "stroke-width": e.value.xyAxisStrokeWidth,
1380
- "stroke-linecap": "round"
1381
- }, null, 8, Pl),
1382
- _("line", {
1383
- x1: s.value.drawingArea.left,
1384
- x2: s.value.drawingArea.right,
1385
- y1: isNaN(s.value.absoluteZero) ? s.value.drawingArea.bottom : s.value.absoluteZero,
1386
- y2: isNaN(s.value.absoluteZero) ? s.value.drawingArea.bottom : s.value.absoluteZero,
1387
- stroke: e.value.xyAxisStroke,
1388
- "stroke-width": e.value.xyAxisStrokeWidth,
1389
- "stroke-linecap": "round"
1390
- }, null, 8, Rl)
1391
- ])) : m("", !0),
1392
- e.value.xyShowScale ? (l(), o("g", {
1393
- key: 2,
1394
- class: "yLabels",
1395
- ref_key: "scaleLabels",
1396
- ref: Re
1397
- }, [
1398
- (l(!0), o(p, null, I(s.value.yLabels, (t, i) => (l(), o(p, null, [
1399
- t.y <= s.value.drawingArea.bottom ? (l(), o("line", {
1400
- key: 0,
1401
- x1: t.x + 4,
1402
- x2: s.value.drawingArea.left,
1403
- y1: t.y,
1404
- y2: t.y,
1405
- stroke: e.value.xyAxisStroke,
1406
- "stroke-width": e.value.xyAxisStrokeWidth,
1407
- "stroke-linecap": "round"
1408
- }, null, 8, Ml)) : m("", !0),
1409
- t.y <= s.value.drawingArea.bottom ? (l(), o("text", {
1410
- key: 1,
1411
- x: t.x,
1412
- y: t.y + e.value.xyLabelsYFontSize / 3,
1413
- "text-anchor": "end",
1414
- "font-size": e.value.xyLabelsYFontSize,
1415
- fill: e.value.color
1416
- }, F(r(ae)(
1417
- e.value.formatter,
1418
- t.value,
1419
- r(W)({
1420
- p: e.value.valuePrefix,
1421
- v: t.value,
1422
- s: e.value.valueSuffix,
1423
- r: e.value.dataLabelRoundingValue
1424
- }),
1425
- { datapoint: t, seriesIndex: i }
1426
- )), 9, Ol)) : m("", !0)
1427
- ], 64))), 256))
1428
- ], 512)) : m("", !0),
1429
- e.value.xyShowScale && e.value.xyPeriods.length ? (l(), o("g", Fl, [
1430
- (l(!0), o(p, null, I(e.value.xyPeriods.slice(g.value.start, g.value.end), (t, i) => (l(), o("line", {
1431
- x1: s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2,
1432
- x2: s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2,
1433
- y1: s.value.drawingArea.bottom,
1434
- y2: s.value.drawingArea.bottom + 4,
1435
- stroke: e.value.xyAxisStroke,
1436
- "stroke-width": e.value.xyAxisStrokeWidth,
1437
- "stroke-linecap": "round"
1438
- }, null, 8, Nl))), 256)),
1439
- _("g", {
1440
- ref_key: "timeLabelsEls",
1441
- ref: J
1442
- }, [
1443
- (l(!0), o(p, null, I(Y.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
1444
- !e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((g.value.end - g.value.start) / xe.value) === 0 || g.value.end - g.value.start <= xe.value ? (l(), o("g", Dl, [
1445
- String(t).includes(`
1446
- `) ? (l(), o("text", {
1447
- key: 1,
1448
- class: "vue-data-ui-time-label",
1449
- "font-size": e.value.xyLabelsXFontSize,
1450
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1451
- fill: e.value.color,
1452
- transform: `translate(${s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2}, ${s.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`,
1453
- innerHTML: r(Rt)({
1454
- content: String(t),
1455
- fontSize: e.value.xyLabelsXFontSize,
1456
- fill: e.value.color,
1457
- x: 0,
1458
- y: 0
1459
- })
1460
- }, null, 8, Ul)) : (l(), o("text", {
1461
- key: 0,
1462
- class: "vue-data-ui-time-label",
1463
- "font-size": e.value.xyLabelsXFontSize,
1464
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1465
- fill: e.value.color,
1466
- transform: `translate(${s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2}, ${s.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`
1467
- }, F(t), 9, Bl))
1468
- ])) : m("", !0)
1469
- ], 64))), 256))
1470
- ], 512)
1471
- ])) : m("", !0),
1472
- _("g", Vl, [
1473
- (l(!0), o(p, null, I(s.value.dataset, (t, i) => (l(), o(p, null, [
1474
- (l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("rect", {
1475
- x: u.x,
1476
- width: u.width <= 0 ? 1e-5 : u.width,
1477
- height: r(le)(u.height <= 0 ? 1e-5 : u.height),
1478
- y: r(le)(u.y),
1479
- fill: t.color,
1480
- stroke: e.value.backgroundColor,
1481
- "stroke-width": e.value.barStrokeWidth,
1482
- "stroke-linecap": "round",
1483
- class: ce({ "vue-data-ui-bar-animated": e.value.barAnimated && u.value < 0 && !r(B) })
1484
- }, [
1485
- e.value.barAnimated && u.value > 0 && !r(Fe) && !r(Ne) ? (l(), o("animate", {
1486
- key: 0,
1487
- attributeName: "height",
1488
- from: 0,
1489
- to: u.height,
1490
- dur: "0.5s"
1491
- }, null, 8, ql)) : m("", !0),
1492
- e.value.barAnimated && u.value > 0 && !r(Fe) && !r(Ne) ? (l(), o("animate", {
1493
- key: 1,
1494
- attributeName: "y",
1495
- from: s.value.absoluteZero,
1496
- to: s.value.absoluteZero - u.height,
1497
- dur: "0.5s"
1498
- }, null, 8, Wl)) : m("", !0)
1499
- ], 10, Hl))), 256))
1500
- ], 64))), 256))
1501
- ]),
1502
- e.value.showDataLabels ? (l(), o("g", Xl, [
1503
- (l(!0), o(p, null, I(s.value.dataset, (t, i) => (l(), o(p, null, [
1504
- (l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("text", {
1505
- x: u.x + u.width / 2,
1506
- y: r(le)(u.y) - e.value.dataLabelFontSize / 2,
1507
- "text-anchor": "middle",
1508
- "font-size": e.value.dataLabelFontSize,
1509
- fill: t.color,
1510
- class: "quick-animation"
1511
- }, F(r(ae)(
1512
- e.value.formatter,
1513
- r(le)(u.value),
1514
- r(W)({
1515
- p: e.value.valuePrefix,
1516
- v: r(le)(u.value),
1517
- s: e.value.valueSuffix,
1518
- r: e.value.dataLabelRoundingValue
1519
- }),
1520
- { datapoint: u, seriesIndex: x }
1521
- )), 9, jl))), 256))
1522
- ], 64))), 256))
1523
- ])) : m("", !0),
1524
- Ye.value ? (l(), o("g", Gl, [
1525
- (l(!0), o(p, null, I(s.value.extremes.maxSeries, (t, i) => (l(), o("rect", {
1526
- x: s.value.drawingArea.left + i * s.value.slotSize,
1527
- y: s.value.drawingArea.top,
1528
- height: s.value.drawingArea.height <= 0 ? 1e-5 : s.value.drawingArea.height,
1529
- width: s.value.slotSize <= 0 ? 1e-5 : s.value.slotSize,
1530
- fill: [Z.value, Q.value].includes(i) ? e.value.xyHighlighterColor : "transparent",
1531
- style: R(`opacity:${e.value.xyHighlighterOpacity}`),
1532
- onMouseenter: (u) => s.value.useTooltip(i),
1533
- onMouseleave: (u) => s.value.killTooltip(i),
1534
- onClick: (u) => s.value.selectDatapoint(i)
1535
- }, null, 44, Yl))), 256))
1536
- ])) : m("", !0)
1537
- ], 64)) : m("", !0),
1538
- [L.LINE, L.BAR].includes(C.value) ? (l(), o("g", Zl, [
1539
- e.value.xAxisLabel && C.value === L.LINE ? (l(), o("g", {
1540
- key: 0,
1541
- ref_key: "xAxisLabel",
1542
- ref: dt
1543
- }, [
1544
- _("text", {
1545
- "font-size": e.value.axisLabelsFontSize,
1546
- fill: e.value.color,
1547
- "text-anchor": "middle",
1548
- x: d.value.drawingArea.left + d.value.drawingArea.width / 2,
1549
- y: b.value.height - e.value.axisLabelsFontSize / 3
1550
- }, F(e.value.xAxisLabel), 9, Jl)
1551
- ], 512)) : m("", !0),
1552
- e.value.xAxisLabel && C.value === L.BAR ? (l(), o("g", {
1553
- key: 1,
1554
- ref_key: "xAxisLabel",
1555
- ref: dt
1556
- }, [
1557
- _("text", {
1558
- "font-size": e.value.axisLabelsFontSize,
1559
- fill: e.value.color,
1560
- "text-anchor": "middle",
1561
- x: s.value.drawingArea.left + s.value.drawingArea.width / 2,
1562
- y: b.value.height - e.value.axisLabelsFontSize / 3
1563
- }, F(e.value.xAxisLabel), 9, Ql)
1564
- ], 512)) : m("", !0),
1565
- e.value.yAxisLabel && C.value === L.LINE ? (l(), o("g", {
1566
- key: 2,
1567
- ref_key: "yAxisLabel",
1568
- ref: ct
1569
- }, [
1570
- _("text", {
1571
- "font-size": e.value.axisLabelsFontSize,
1572
- fill: e.value.color,
1573
- transform: `translate(${e.value.axisLabelsFontSize}, ${d.value.drawingArea.top + d.value.drawingArea.height / 2}) rotate(-90)`,
1574
- "text-anchor": "middle"
1575
- }, F(e.value.yAxisLabel), 9, Kl)
1576
- ], 512)) : m("", !0),
1577
- e.value.yAxisLabel && C.value === L.BAR ? (l(), o("g", {
1578
- key: 3,
1579
- ref_key: "yAxisLabel",
1580
- ref: ct
1581
- }, [
1582
- _("text", {
1583
- "font-size": e.value.axisLabelsFontSize,
1584
- fill: e.value.color,
1585
- transform: `translate(${e.value.axisLabelsFontSize}, ${s.value.drawingArea.top + s.value.drawingArea.height / 2}) rotate(-90)`,
1586
- "text-anchor": "middle"
1587
- }, F(e.value.yAxisLabel), 9, eo)
1588
- ], 512)) : m("", !0)
1589
- ])) : m("", !0)
1590
- ], 12, Na)) : m("", !0),
1591
- a.$slots.watermark ? (l(), o("div", to, [
1592
- U(a.$slots, "watermark", he(fe({ isPrinting: r(Fe) || r(Ne) })), void 0, !0)
1593
- ])) : m("", !0),
1594
- [L.BAR, L.LINE].includes(C.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? (l(), o("div", {
1595
- key: `slicer_${Pe.value}`,
1596
- ref_key: "quickChartSlicer",
1597
- ref: it
1598
- }, [
1599
- (l(), Ie(La, {
1600
- ref_key: "slicerComponent",
1601
- ref: Lt,
1602
- key: `slicer_${Pe.value}`,
1603
- background: e.value.zoomColor,
1604
- borderColor: e.value.backgroundColor,
1605
- fontSize: e.value.zoomFontSize,
1606
- useResetSlot: e.value.zoomUseResetSlot,
1607
- labelLeft: e.value.xyPeriods[g.value.start] ? Y.value[0].text : "",
1608
- labelRight: e.value.xyPeriods[g.value.end - 1] ? Y.value.at(-1).text : "",
1609
- textColor: e.value.color,
1610
- inputColor: e.value.zoomColor,
1611
- selectColor: e.value.zoomHighlightColor,
1612
- max: k.value.maxSeriesLength,
1613
- min: 0,
1614
- valueStart: g.value.start,
1615
- valueEnd: g.value.end,
1616
- smoothMinimap: e.value.zoomMinimap.smooth,
1617
- minimapSelectedColor: e.value.zoomMinimap.selectedColor,
1618
- minimapSelectedColorOpacity: e.value.zoomMinimap.selectedColorOpacity,
1619
- minimapSelectionRadius: e.value.zoomMinimap.selectionRadius,
1620
- minimapLineColor: e.value.zoomMinimap.lineColor,
1621
- minimap: Jt.value,
1622
- minimapIndicatorColor: e.value.zoomMinimap.indicatorColor,
1623
- verticalHandles: e.value.zoomMinimap.verticalHandles,
1624
- minimapSelectedIndex: Q.value,
1625
- start: g.value.start,
1626
- "onUpdate:start": c[0] || (c[0] = (t) => g.value.start = t),
1627
- end: g.value.end,
1628
- "onUpdate:end": c[1] || (c[1] = (t) => g.value.end = t),
1629
- refreshStartPoint: e.value.zoomStartIndex !== null ? e.value.zoomStartIndex : 0,
1630
- refreshEndPoint: e.value.zoomEndIndex !== null ? e.value.zoomEndIndex + 1 : k.value.maxSeriesLength,
1631
- enableRangeHandles: e.value.zoomEnableRangeHandles,
1632
- enableSelectionDrag: e.value.zoomEnableSelectionDrag,
1633
- minimapCompact: e.value.zoomMinimap.compact,
1634
- minimapMerged: e.value.zoomMinimap.merged,
1635
- allMinimaps: Kt.value,
1636
- minimapFrameColor: e.value.zoomMinimap.frameColor,
1637
- focusOnDrag: e.value.zoomFocusOnDrag,
1638
- focusRangeRatio: e.value.zoomFocusRangeRatio,
1639
- onReset: Yt,
1640
- onTrapMouse: Gt
1641
- }, {
1642
- "reset-action": te(({ reset: t }) => [
1643
- U(a.$slots, "reset-action", he(fe({ reset: t })), void 0, !0)
1644
- ]),
1645
- _: 3
1646
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "smoothMinimap", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectionRadius", "minimapLineColor", "minimap", "minimapIndicatorColor", "verticalHandles", "minimapSelectedIndex", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "minimapCompact", "minimapMerged", "allMinimaps", "minimapFrameColor", "focusOnDrag", "focusRangeRatio"]))
1647
- ])) : m("", !0),
1648
- _("div", {
1649
- id: `legend-bottom-${X.value}`
1650
- }, null, 8, ao),
1651
- vt.value ? (l(), Ie(ua, {
1652
- key: 7,
1653
- to: e.value.legendPosition === "top" ? `#legend-top-${X.value}` : `#legend-bottom-${X.value}`
1654
- }, [
1655
- e.value.showLegend ? (l(), o("div", {
1656
- key: 0,
1657
- ref_key: "quickChartLegend",
1658
- ref: nt,
1659
- class: "vue-ui-quick-chart-legend",
1660
- style: R(`background:transparent;color:${e.value.color}`)
1661
- }, [
1662
- C.value === L.DONUT ? (l(!0), o(p, { key: 0 }, I(T.value.legend, (t, i) => (l(), o("div", {
1663
- class: "vue-ui-quick-chart-legend-item",
1664
- onClick: (u) => {
1665
- jt(t, T.value.dataset), me("selectLegend", t);
1666
- },
1667
- style: R(`cursor: ${T.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1668
- }, [
1669
- e.value.useCustomLegend ? U(a.$slots, "legend", et({
1670
- key: 0,
1671
- ref_for: !0
1672
- }, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
1673
- ke(r(D), {
1674
- name: e.value.legendIcon,
1675
- stroke: t.color,
1676
- size: e.value.legendIconSize
1677
- }, null, 8, ["name", "stroke", "size"]),
1678
- _("span", {
1679
- style: R(`font-size:${e.value.legendFontSize}px`)
1680
- }, F(t.name), 5),
1681
- _("span", {
1682
- style: R(`font-size:${e.value.legendFontSize}px;font-variant-numeric:tabular-nums`)
1683
- }, F(w.value.includes(t.id) ? "-" : r(ae)(
1684
- e.value.formatter,
1685
- t.absoluteValue,
1686
- r(W)({
1687
- p: e.value.valuePrefix,
1688
- v: t.absoluteValue,
1689
- s: e.value.valueSuffix,
1690
- r: e.value.dataLabelRoundingValue
1691
- }),
1692
- { datapoint: t, seriesIndex: i }
1693
- )), 5),
1694
- w.value.includes(t.id) ? (l(), o("span", {
1695
- key: 0,
1696
- style: R(`font-size:${e.value.legendFontSize}px`)
1697
- }, " ( - % ) ", 4)) : De.value ? (l(), o("span", {
1698
- key: 1,
1699
- style: R(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
1700
- }, " ( - % ) ", 4)) : (l(), o("span", {
1701
- key: 2,
1702
- style: R(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
1703
- }, " (" + F(r(W)({
1704
- v: t.value / T.value.total * 100,
1705
- s: "%",
1706
- r: e.value.dataLabelRoundingPercentage
1707
- })) + ") ", 5))
1708
- ], 64))
1709
- ], 12, lo))), 256)) : m("", !0),
1710
- C.value === L.LINE ? (l(!0), o(p, { key: 1 }, I(d.value.legend, (t, i) => (l(), o("div", {
1711
- class: "vue-ui-quick-chart-legend-item",
1712
- onClick: (u) => {
1713
- bt(t.id, d.value.legend.length - 1), me("selectLegend", t);
1714
- },
1715
- style: R(`cursor: ${d.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1716
- }, [
1717
- e.value.useCustomLegend ? U(a.$slots, "legend", et({
1718
- key: 0,
1719
- ref_for: !0
1720
- }, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
1721
- ke(r(D), {
1722
- name: e.value.legendIcon,
1723
- stroke: t.color,
1724
- size: e.value.legendIconSize
1725
- }, null, 8, ["name", "stroke", "size"]),
1726
- _("span", {
1727
- style: R(`font-size:${e.value.legendFontSize}px`)
1728
- }, F(t.name), 5)
1729
- ], 64))
1730
- ], 12, oo))), 256)) : m("", !0),
1731
- C.value === L.BAR ? (l(!0), o(p, { key: 2 }, I(s.value.legend, (t, i) => (l(), o("div", {
1732
- class: "vue-ui-quick-chart-legend-item",
1733
- onClick: (u) => {
1734
- bt(t.id, s.value.legend.length - 1), me("selectLegend", t);
1735
- },
1736
- style: R(`cursor: ${s.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1737
- }, [
1738
- e.value.useCustomLegend ? U(a.$slots, "legend", et({
1739
- key: 0,
1740
- ref_for: !0
1741
- }, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
1742
- ke(r(D), {
1743
- name: e.value.legendIcon,
1744
- stroke: t.color,
1745
- size: e.value.legendIconSize
1746
- }, null, 8, ["name", "stroke", "size"]),
1747
- _("span", {
1748
- style: R(`font-size:${e.value.legendFontSize}px`)
1749
- }, F(t.name), 5)
1750
- ], 64))
1751
- ], 12, no))), 256)) : m("", !0)
1752
- ], 4)) : m("", !0)
1753
- ], 8, ["to"])) : m("", !0),
1754
- a.$slots.source ? (l(), o("div", {
1755
- key: 8,
1756
- ref_key: "source",
1757
- ref: ut,
1758
- dir: "auto"
1759
- }, [
1760
- U(a.$slots, "source", {}, void 0, !0)
1761
- ], 512)) : m("", !0),
1762
- ke(r(be), {
1763
- show: ge.value.showTooltip && re.value,
1764
- backgroundColor: e.value.backgroundColor,
1765
- color: e.value.color,
1766
- borderRadius: e.value.tooltipBorderRadius,
1767
- borderColor: e.value.tooltipBorderColor,
1768
- borderWidth: e.value.tooltipBorderWidth,
1769
- fontSize: e.value.tooltipFontSize,
1770
- backgroundOpacity: e.value.tooltipBackgroundOpacity,
1771
- position: e.value.tooltipPosition,
1772
- offsetY: e.value.tooltipOffsetY,
1773
- parent: M.value,
1774
- content: se.value,
1775
- isFullscreen: Ue.value,
1776
- isCustom: r(qe)(e.value.tooltipCustomFormat),
1777
- smooth: e.value.tooltipSmooth,
1778
- smoothForce: e.value.tooltipSmoothForce,
1779
- smoothSnapThreshold: e.value.tooltipSmoothSnapThreshold,
1780
- backdropFilter: e.value.tooltipBackdropFilter
1781
- }, {
1782
- "tooltip-before": te(() => [
1783
- U(a.$slots, "tooltip-before", he(fe({ ...Se.value })), void 0, !0)
1784
- ]),
1785
- "tooltip-after": te(() => [
1786
- U(a.$slots, "tooltip-after", he(fe({ ...Se.value })), void 0, !0)
1787
- ]),
1788
- _: 3
1789
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "smoothForce", "smoothSnapThreshold", "backdropFilter"]),
1790
- r(B) ? (l(), Ie(Ca, { key: 9 })) : m("", !0)
1791
- ], 46, Oa)) : (l(), o("div", io, [
1792
- ke(r(D), {
1793
- name: "circleCancel",
1794
- stroke: "red"
1795
- }),
1796
- c[5] || (c[5] = _("span", null, "Dataset is not processable", -1))
1797
- ]));
1798
- }
1799
- }, So = /* @__PURE__ */ $a(uo, [["__scopeId", "data-v-13414fa9"]]);
1800
- export {
1801
- So as default
1802
- };