vue-data-ui 2.3.2 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-C6KVJkgd.cjs +0 -843
  148. package/dist/index-bDBuMYfe.js +0 -57303
@@ -0,0 +1,1006 @@
1
+ import { ref as c, computed as b, watch as le, onMounted as da, onBeforeUnmount as ha, openBlock as O, createElementBlock as de, normalizeStyle as U, normalizeClass as ya, createVNode as he, createCommentVNode as te, createBlock as A, unref as Y, createSlots as fa, withCtx as m, renderSlot as C, normalizeProps as oe, guardReactiveProps as ue, createElementVNode as Z, toDisplayString as _e, createTextVNode as ga } from "vue";
2
+ import { u as pa, c as ba, t as ma, a as xa, p as E, b as La, z as ye, f as G, d as De, T as ka, o as Ca, e as wa, v as He, w as Sa, n as za, q as $a, r as V, l as Ta } from "./index-uOtklCCx.js";
3
+ import { d as Ma, c as Ra, a as We, t as Oa, l as k, r as fe, b as I, p as Be, u as Ia } from "./useResponsive-NZB-WLRF.js";
4
+ import { _ as Pa } from "./Tooltip-C3phqKuU.js";
5
+ import { L as Fa } from "./Legend-CxvJTjEm.js";
6
+ import { _ as Ea } from "./Title-2iks1ziC.js";
7
+ import { S as Na } from "./Slicer-Bxg5niHl.js";
8
+ import { u as _a, U as Da } from "./usePrinter-B6xQCyL-.js";
9
+ import Ha from "./vue-ui-accordion-HJPf7My0.js";
10
+ import { D as Wa } from "./DataTable-CwaOlAsy.js";
11
+ import Ba from "./vue-ui-skeleton-BM9rwmxY.js";
12
+ import { u as Xe } from "./useNestedProp-BgWkUab_.js";
13
+ import { _ as Xa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const Ua = ["id"], Aa = ["onClick"], Ya = ["innerHTML"], Za = {
15
+ __name: "vue-ui-xy-canvas",
16
+ props: {
17
+ dataset: {
18
+ type: Array,
19
+ default() {
20
+ return [];
21
+ }
22
+ },
23
+ config: {
24
+ type: Object,
25
+ default() {
26
+ return {};
27
+ }
28
+ }
29
+ },
30
+ emits: ["selectLegend"],
31
+ setup(ge, { expose: Ue, emit: Ae }) {
32
+ const N = ge, { vue_ui_xy_canvas: Ye } = pa(), re = c(ba()), j = c(null), S = c(null), D = c(null), s = c(null), y = c(1), T = c(1), q = c(!1), d = c(null), J = c(""), pe = c(null), w = c([]), _ = c(1), P = c(!0), z = c(!0), se = c(null), be = c(0), me = c(0), ne = c(!1), xe = c(null), Le = c(null), ke = c(null), ie = b(() => !!N.dataset && N.dataset.length), a = b(() => {
33
+ const e = Xe({
34
+ userConfig: N.config,
35
+ defaultConfig: Ye
36
+ });
37
+ return e.theme ? {
38
+ ...Xe({
39
+ userConfig: ma.vue_ui_xy_canvas[e.theme] || N.config,
40
+ defaultConfig: e
41
+ }),
42
+ customPalette: xa[e.theme] || E
43
+ } : e;
44
+ }), Ce = c(a.value.style.chart.aspectRatio), { isPrinting: Ze, isImaging: Ge, generatePdf: we, generateImage: Se } = _a({
45
+ elementId: `xy_canvas_${re.value}`,
46
+ fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas"
47
+ }), r = c({
48
+ showTable: a.value.table.show,
49
+ showDataLabels: a.value.style.chart.dataLabels.show,
50
+ stacked: a.value.style.chart.stacked,
51
+ showTooltip: a.value.style.chart.tooltip.show
52
+ });
53
+ function Ve(e) {
54
+ ne.value = e, me.value += 1;
55
+ }
56
+ const ze = b(() => La(a.value.customPalette)), F = b(() => Math.max(...H.value.filter((e, t) => !w.value.includes(e.absoluteIndex)).map((e) => e.series.length))), l = b(() => {
57
+ const e = y.value - y.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right);
58
+ return {
59
+ canvasWidth: y.value,
60
+ canvasHeight: T.value,
61
+ left: y.value * a.value.style.chart.paddingProportions.left,
62
+ top: T.value * a.value.style.chart.paddingProportions.top,
63
+ right: y.value - y.value * a.value.style.chart.paddingProportions.right,
64
+ bottom: T.value - T.value * a.value.style.chart.paddingProportions.bottom,
65
+ width: e,
66
+ height: T.value - T.value * (a.value.style.chart.paddingProportions.top + a.value.style.chart.paddingProportions.bottom),
67
+ slot: e / (u.value.end - u.value.start)
68
+ };
69
+ });
70
+ function $e(e, t) {
71
+ return e / t;
72
+ }
73
+ function je({ hasAutoScale: e, series: t, min: o, max: i, scale: v, yOffset: f, individualHeight: n, stackIndex: g = null }) {
74
+ return t.map((L, ce) => {
75
+ const $ = v.min < 0 ? Math.abs(v.min) : 0, M = $e(L + $, $ + v.max);
76
+ let R, W;
77
+ e && (R = Math.abs(v.min), W = $e(L + R, v.max + R));
78
+ let B = 0;
79
+ return g === null ? B = l.value.bottom - l.value.height * (e ? W : M) : B = l.value.bottom - f - n * (e ? W : M), {
80
+ x: l.value.left + l.value.slot * ce + l.value.slot / 2,
81
+ y: B,
82
+ value: L
83
+ };
84
+ });
85
+ }
86
+ const p = b(() => {
87
+ const e = Math.min(...H.value.filter((n, g) => !w.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(u.value.start, u.value.end))), t = Math.max(...H.value.filter((n, g) => !w.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(u.value.start, u.value.end))), o = ye(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, a.value.style.chart.scale.ticks), i = o.min < 0 ? Math.abs(o.min) : 0, v = l.value.bottom - l.value.height * (i / (o.max + i)), f = o.ticks.map((n) => ({
88
+ y: l.value.bottom - l.value.height * ((n + i) / (o.max + i)),
89
+ x: l.value.left - 8,
90
+ value: n
91
+ }));
92
+ return {
93
+ absoluteMin: i,
94
+ max: t,
95
+ min: e,
96
+ scale: o,
97
+ yLabels: f,
98
+ zero: v
99
+ };
100
+ }), qe = b(() => h.value.map((e) => `
101
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
102
+ <svg viewBox="0 0 10 10" height="12" width="12">
103
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
104
+ </svg>
105
+ <span>${e.name ? e.name + ": " : ""}</span>
106
+ <span>${G({
107
+ p: e.prefix || "",
108
+ v: e.series[d.value],
109
+ s: e.suffix || "",
110
+ r: e.rounding || 0
111
+ })}</span>
112
+ </div>
113
+ `)), H = b(() => N.dataset.map((e, t) => ({
114
+ ...e,
115
+ absoluteIndex: t,
116
+ color: De(e.color || ze.value[t] || E[t] || E[t % E.length])
117
+ }))), h = b(() => ka(H.value.filter((e, t) => !w.value.includes(e.absoluteIndex))).map((e, t) => ({
118
+ ...e,
119
+ series: e.series.slice(u.value.start, u.value.end)
120
+ })).map((e, t) => {
121
+ let o = Math.min(...e.series) || 0, i = Math.max(...e.series) || 1;
122
+ o === i && (o = o >= 0 ? i - 1 : o, i = i >= 0 ? i : o + 1);
123
+ const f = {
124
+ ratios: e.series.filter((X) => ![null, void 0].includes(X)).map((X) => (X - o) / (i - o)),
125
+ valueMin: o,
126
+ valueMax: i
127
+ }, n = e.scaleSteps || a.value.style.chart.scale.ticks;
128
+ let g;
129
+ e.autoScaling ? g = ye(f.valueMin, f.valueMax, n) : g = ye(f.valueMin < 0 ? f.valueMin : 0, f.valueMax <= 0 ? 0 : f.valueMax, n);
130
+ const L = r.value.stacked ? l.value.height * (1 - e.cumulatedStackRatio) : 0, ce = r.value.stacked ? l.value.height / a.value.style.chart.stackGap : 0, $ = r.value.stacked ? l.value.height * e.stackRatio - ce : l.value.height, M = g.min < 0 ? Math.abs(g.min) : 0;
131
+ let R;
132
+ e.autoScaling && r.value.stacked && i <= 0 ? R = l.value.bottom - L - $ : R = l.value.bottom - L - $ * (M / (g.max + M));
133
+ const W = g.ticks.map((X, ca) => ({
134
+ y: l.value.bottom - L - $ * (ca / (g.ticks.length - 1)),
135
+ x: l.value.left - 8,
136
+ value: X
137
+ })), B = je({
138
+ hasAutoScale: r.value.stacked && e.autoScaling,
139
+ series: e.series,
140
+ min: r.value.stacked ? o : p.value.min,
141
+ max: r.value.stacked ? i : p.value.max,
142
+ scale: r.value.stacked ? g : p.value.scale,
143
+ yOffset: L,
144
+ individualHeight: $,
145
+ stackIndex: r.value.stacked ? t : null
146
+ });
147
+ return {
148
+ ...e,
149
+ coordinatesLine: B,
150
+ min: o,
151
+ max: i,
152
+ localScale: g,
153
+ localZero: R,
154
+ localMin: M,
155
+ localYLabels: W,
156
+ yOffset: L,
157
+ individualHeight: $
158
+ };
159
+ })), u = c({
160
+ start: 0,
161
+ end: F.value
162
+ });
163
+ function Je() {
164
+ u.value = {
165
+ start: 0,
166
+ end: F.value
167
+ }, be.value += 1;
168
+ }
169
+ const Ke = b(() => h.value.filter((e) => ["line", "plot", void 0].includes(e.type))), x = b(() => h.value.filter((e) => e.type === "bar"));
170
+ function Qe() {
171
+ if (!S.value)
172
+ return;
173
+ const e = D.value.offsetWidth, t = D.value.offsetHeight;
174
+ S.value.width = e * _.value * 2, S.value.height = t * _.value * 2, y.value = e * _.value * 2, T.value = t * _.value * 2, s.value.scale(_.value, _.value), ve();
175
+ }
176
+ function ea() {
177
+ if (s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0, l.value.canvasWidth, l.value.canvasHeight), r.value.stacked)
178
+ a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength && h.value.forEach((e) => {
179
+ for (let t = 0; t < u.value.end - u.value.start + 1; t += 1)
180
+ k(
181
+ s.value,
182
+ [
183
+ {
184
+ x: l.value.left + l.value.slot * t,
185
+ y: l.value.bottom - e.yOffset - e.individualHeight
186
+ },
187
+ {
188
+ x: l.value.left + l.value.slot * t,
189
+ y: l.value.bottom - e.yOffset
190
+ }
191
+ ],
192
+ {
193
+ color: a.value.style.chart.grid.y.verticalLines.color
194
+ }
195
+ );
196
+ }), a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
197
+ e.localYLabels.forEach((t, o) => {
198
+ o < e.localYLabels.length - 1 && fe(
199
+ s.value,
200
+ [
201
+ { x: l.value.left, y: t.y },
202
+ { x: l.value.right, y: t.y },
203
+ { x: l.value.right, y: e.localYLabels[o + 1].y },
204
+ { x: l.value.left, y: e.localYLabels[o + 1].y }
205
+ ],
206
+ {
207
+ fillColor: o % 2 === 0 ? "transparent" : a.value.style.chart.grid.x.horizontalLines.color + V[a.value.style.chart.grid.x.horizontalLines.opacity],
208
+ strokeColor: "transparent"
209
+ }
210
+ );
211
+ });
212
+ }) : h.value.forEach((e) => {
213
+ e.localYLabels.slice(u.value.start, u.value.end).forEach((t) => {
214
+ k(
215
+ s.value,
216
+ [
217
+ { x: l.value.left, y: t.y },
218
+ { x: l.value.right, y: t.y }
219
+ ],
220
+ {
221
+ color: a.value.style.chart.grid.x.horizontalLines.color
222
+ }
223
+ );
224
+ });
225
+ })), a.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
226
+ k(
227
+ s.value,
228
+ [
229
+ { x: l.value.left, y: e.localZero },
230
+ { x: l.value.right, y: e.localZero }
231
+ ],
232
+ {
233
+ color: a.value.style.chart.grid.zeroLine.color,
234
+ lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
235
+ }
236
+ );
237
+ }), a.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
238
+ k(
239
+ s.value,
240
+ [
241
+ { x: l.value.left, y: l.value.bottom - e.yOffset },
242
+ { x: l.value.left, y: l.value.bottom - e.yOffset - e.individualHeight }
243
+ ],
244
+ {
245
+ color: e.color
246
+ }
247
+ ), k(
248
+ s.value,
249
+ [
250
+ { x: l.value.right, y: l.value.bottom - e.yOffset },
251
+ { x: l.value.right, y: l.value.bottom - e.yOffset - e.individualHeight }
252
+ ],
253
+ {
254
+ color: e.color
255
+ }
256
+ ), e.localYLabels.forEach((t) => {
257
+ I(
258
+ s.value,
259
+ G({
260
+ p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
261
+ v: t.value,
262
+ s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
263
+ r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
264
+ }),
265
+ t.x + a.value.style.chart.grid.y.axisLabels.offsetX,
266
+ t.y,
267
+ {
268
+ align: "right",
269
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
270
+ color: e.color
271
+ }
272
+ );
273
+ });
274
+ }), h.value.forEach((e) => {
275
+ I(
276
+ s.value,
277
+ e.name,
278
+ y.value / 35,
279
+ l.value.bottom - e.yOffset - e.individualHeight / 2,
280
+ {
281
+ align: "center",
282
+ rotation: -90,
283
+ color: e.color,
284
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`
285
+ }
286
+ );
287
+ });
288
+ else {
289
+ if (a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
290
+ for (let e = 0; e < u.value.end - u.value.start + 1; e += 1)
291
+ k(
292
+ s.value,
293
+ [
294
+ { x: l.value.left + l.value.slot * e, y: l.value.top },
295
+ { x: l.value.left + l.value.slot * e, y: l.value.bottom }
296
+ ],
297
+ {
298
+ color: a.value.style.chart.grid.y.verticalLines.color
299
+ }
300
+ );
301
+ a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? p.value.yLabels.forEach((e, t) => {
302
+ t < p.value.yLabels.length - 1 && fe(
303
+ s.value,
304
+ [
305
+ { x: l.value.left, y: e.y },
306
+ { x: l.value.right, y: e.y },
307
+ { x: l.value.right, y: p.value.yLabels[t + 1].y },
308
+ { x: l.value.left, y: p.value.yLabels[t + 1].y }
309
+ ],
310
+ {
311
+ fillColor: t % 2 === 0 ? "transparent" : a.value.style.chart.grid.x.horizontalLines.color + V[a.value.style.chart.grid.x.horizontalLines.opacity],
312
+ strokeColor: "transparent"
313
+ }
314
+ );
315
+ }) : p.value.yLabels.forEach((e) => {
316
+ k(
317
+ s.value,
318
+ [
319
+ { x: l.value.left, y: e.y },
320
+ { x: l.value.right, y: e.y }
321
+ ],
322
+ {
323
+ color: a.value.style.chart.grid.x.horizontalLines.color
324
+ }
325
+ );
326
+ })), a.value.style.chart.grid.y.showAxis && k(
327
+ s.value,
328
+ [
329
+ { x: l.value.left, y: l.value.top },
330
+ { x: l.value.left, y: l.value.bottom }
331
+ ],
332
+ {
333
+ color: a.value.style.chart.grid.y.axisColor,
334
+ lineWidth: a.value.style.chart.grid.y.axisThickness
335
+ }
336
+ ), a.value.style.chart.grid.x.showAxis && k(
337
+ s.value,
338
+ [
339
+ { x: l.value.left, y: l.value.bottom },
340
+ { x: l.value.right, y: l.value.bottom }
341
+ ],
342
+ {
343
+ color: a.value.style.chart.grid.x.axisColor,
344
+ lineWidth: a.value.style.chart.grid.x.axisThickness
345
+ }
346
+ ), a.value.style.chart.grid.zeroLine.show && k(
347
+ s.value,
348
+ [
349
+ { x: l.value.left, y: p.value.zero },
350
+ { x: l.value.right, y: p.value.zero }
351
+ ],
352
+ {
353
+ color: a.value.style.chart.grid.zeroLine.color,
354
+ lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
355
+ }
356
+ ), a.value.style.chart.grid.y.axisLabels.show && p.value.yLabels.forEach((e) => {
357
+ I(
358
+ s.value,
359
+ G({
360
+ p: a.value.style.chart.grid.y.axisLabels.prefix || "",
361
+ v: e.value,
362
+ s: a.value.style.chart.grid.y.axisLabels.suffix || "",
363
+ r: a.value.style.chart.grid.y.axisLabels.rounding || 0
364
+ }),
365
+ e.x + a.value.style.chart.grid.y.axisLabels.offsetX,
366
+ e.y,
367
+ {
368
+ align: "right",
369
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
370
+ color: a.value.style.chart.grid.y.axisLabels.color
371
+ }
372
+ );
373
+ });
374
+ }
375
+ a.value.style.chart.grid.y.axisName && I(
376
+ s.value,
377
+ a.value.style.chart.grid.y.axisName,
378
+ y.value - y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
379
+ l.value.bottom - l.value.height / 2,
380
+ {
381
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
382
+ color: a.value.style.chart.color,
383
+ align: "center",
384
+ rotation: 90
385
+ }
386
+ ), a.value.style.chart.grid.x.axisName && I(
387
+ s.value,
388
+ a.value.style.chart.grid.x.axisName,
389
+ y.value / 2,
390
+ T.value,
391
+ {
392
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
393
+ color: a.value.style.chart.color,
394
+ align: "center"
395
+ }
396
+ );
397
+ }
398
+ function aa(e) {
399
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) {
400
+ const o = (d.value === t ? y.value / 150 : a.value.style.chart.line.plots.show ? y.value / 200 : 0) * a.value.style.chart.line.plots.radiusRatio;
401
+ We(
402
+ s.value,
403
+ { x: e.coordinatesLine[t].x, y: e.coordinatesLine[t].y },
404
+ o,
405
+ {
406
+ color: a.value.style.chart.backgroundColor,
407
+ fillStyle: e.color,
408
+ strokeColor: "transparent"
409
+ }
410
+ );
411
+ }
412
+ }
413
+ function la(e) {
414
+ for (let t = 0; t < e.coordinatesLine.length; t += 1)
415
+ I(
416
+ s.value,
417
+ G({
418
+ p: e.prefix || "",
419
+ v: e.coordinatesLine[t].value,
420
+ s: e.suffix || "",
421
+ r: e.rounding || 0
422
+ }),
423
+ e.coordinatesLine[t].x,
424
+ e.coordinatesLine[t].y + a.value.style.chart.dataLabels.offsetY,
425
+ {
426
+ align: "center",
427
+ font: `${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
428
+ color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color,
429
+ strokeColor: a.value.style.chart.backgroundColor,
430
+ lineWidth: 0.8
431
+ }
432
+ );
433
+ }
434
+ function ta() {
435
+ for (let e = u.value.start; e < u.value.end; e += 1)
436
+ (u.value.end - u.value.start < a.value.style.chart.grid.y.timeLabels.modulo || u.value.end - u.value.start >= a.value.style.chart.grid.y.timeLabels.modulo && (e % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 || e === d.value + u.value.start)) && I(
437
+ s.value,
438
+ a.value.style.chart.grid.y.timeLabels.values[e] || e + 1,
439
+ l.value.left + l.value.slot * (e - u.value.start) + l.value.slot / 2,
440
+ l.value.bottom + y.value / a.value.style.chart.grid.y.timeLabels.offsetY,
441
+ {
442
+ align: a.value.style.chart.grid.y.timeLabels.rotation === 0 ? "center" : a.value.style.chart.grid.y.timeLabels.rotation > 0 ? "left" : "right",
443
+ font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
444
+ color: a.value.style.chart.grid.y.timeLabels.color + V[d.value !== null ? d.value + u.value.start === e ? 100 : 20 : 100],
445
+ rotation: a.value.style.chart.grid.y.timeLabels.rotation
446
+ }
447
+ );
448
+ }
449
+ function Te() {
450
+ k(
451
+ s.value,
452
+ [
453
+ { x: l.value.left + l.value.slot * d.value + l.value.slot / 2, y: l.value.top },
454
+ { x: l.value.left + l.value.slot * d.value + l.value.slot / 2, y: l.value.bottom }
455
+ ],
456
+ {
457
+ color: a.value.style.chart.selector.color,
458
+ lineDash: a.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
459
+ lineWidth: 2,
460
+ linceCap: "round"
461
+ }
462
+ );
463
+ }
464
+ function oa() {
465
+ x.value.forEach((e, t) => {
466
+ for (let o = 0; o < e.coordinatesLine.length; o += 1)
467
+ fe(
468
+ s.value,
469
+ [
470
+ {
471
+ x: l.value.left + l.value.slot * o + l.value.slot / 10 + (r.value.stacked ? 0 : l.value.slot / x.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * x.value.length) * t)),
472
+ y: r.value.stacked ? e.localZero : p.value.zero
473
+ },
474
+ {
475
+ x: l.value.left + l.value.slot * o + l.value.slot / 10 + (r.value.stacked ? 0 : l.value.slot / x.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * x.value.length) * t)) + l.value.slot * 0.8 / (r.value.stacked ? 1 : x.value.length),
476
+ y: r.value.stacked ? e.localZero : p.value.zero
477
+ },
478
+ {
479
+ x: l.value.left + l.value.slot * o + l.value.slot / 10 + (r.value.stacked ? 0 : l.value.slot / x.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * x.value.length) * t)) + l.value.slot * 0.8 / (r.value.stacked ? 1 : x.value.length),
480
+ y: e.coordinatesLine[o].y
481
+ },
482
+ {
483
+ x: l.value.left + l.value.slot * o + l.value.slot / 10 + (r.value.stacked ? 0 : l.value.slot / x.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * x.value.length) * t)),
484
+ y: e.coordinatesLine[o].y
485
+ }
486
+ ],
487
+ {
488
+ strokeColor: a.value.style.chart.backgroundColor,
489
+ gradient: {
490
+ type: "linear",
491
+ start: {
492
+ x: e.coordinatesLine[o].x,
493
+ y: e.coordinatesLine[o].y
494
+ },
495
+ end: {
496
+ x: e.coordinatesLine[o].x,
497
+ y: r.value.stacked ? e.localZero : p.value.zero
498
+ },
499
+ stops: [
500
+ { offset: 0, color: e.color },
501
+ { offset: 1, color: Ta(e.color, 0.5) }
502
+ ]
503
+ }
504
+ }
505
+ ), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && I(
506
+ s.value,
507
+ G({
508
+ p: e.prefix || "",
509
+ v: e.coordinatesLine[o].value,
510
+ s: e.suffix || "",
511
+ r: e.rounding || 0
512
+ }),
513
+ l.value.left + l.value.slot * o + l.value.slot / 10 + (r.value.stacked ? 0 : l.value.slot / x.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * x.value.length) * t)) + l.value.slot * 0.4 / (r.value.stacked ? 1 : x.value.length),
514
+ (e.coordinatesLine[o].value < 0 ? r.value.stacked ? e.localZero : p.value.zero : e.coordinatesLine[o].y) + a.value.style.chart.dataLabels.offsetY,
515
+ {
516
+ align: "center",
517
+ font: `${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
518
+ color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color,
519
+ strokeColor: a.value.style.chart.backgroundColor,
520
+ lineWidth: 0.8
521
+ }
522
+ );
523
+ });
524
+ }
525
+ function ua(e) {
526
+ e.useArea ? r.value.stacked ? Be(
527
+ s.value,
528
+ [{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
529
+ {
530
+ fillColor: e.color + V[a.value.style.chart.area.opacity],
531
+ strokeColor: "transparent"
532
+ }
533
+ ) : Be(
534
+ s.value,
535
+ [{ x: e.coordinatesLine[0].x, y: p.value.zero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: p.value.zero }],
536
+ {
537
+ fillColor: e.color + V[a.value.style.chart.area.opacity],
538
+ strokeColor: "transparent"
539
+ }
540
+ ) : k(s.value, e.coordinatesLine, {
541
+ color: e.color,
542
+ lineWidth: 3
543
+ });
544
+ }
545
+ function ra() {
546
+ h.value.forEach((e, t) => {
547
+ k(
548
+ s.value,
549
+ [
550
+ { x: l.value.left, y: l.value.bottom - e.yOffset },
551
+ { x: l.value.right, y: l.value.bottom - e.yOffset }
552
+ ],
553
+ {
554
+ color: a.value.style.chart.grid.x.horizontalLines.color,
555
+ lineWidth: 1
556
+ }
557
+ );
558
+ });
559
+ }
560
+ function ve() {
561
+ ea(), P.value ? (z.value && d.value !== null && a.value.style.chart.selector.show && Te(), oa(), r.value.stacked && a.value.style.chart.grid.x.showAxis && ra(), Ke.value.forEach((e) => {
562
+ (e.type === "line" || !e.type) && ua(e), z.value && (aa(e), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && la(e));
563
+ }), se.value = Ra(S.value)) : (se.value && s.value.drawImage(se.value, 0, 0), z.value && d.value !== null && a.value.style.chart.selector.show && Te(), z.value && d.value !== null && h.value.forEach((e) => {
564
+ if (e.type === "line" || !e.type || e.type === "plot") {
565
+ if (!e.coordinatesLine[d.value]) return;
566
+ e.coordinatesLine[d.value].x !== void 0 && e.coordinatesLine[d.value].y !== void 0 && We(
567
+ s.value,
568
+ {
569
+ x: e.coordinatesLine[d.value].x,
570
+ y: e.coordinatesLine[d.value].y
571
+ },
572
+ y.value / 150 * a.value.style.chart.line.plots.radiusRatio,
573
+ {
574
+ color: a.value.style.chart.backgroundColor,
575
+ fillStyle: e.color,
576
+ strokeColor: "transparent"
577
+ }
578
+ );
579
+ }
580
+ })), a.value.style.chart.grid.y.timeLabels.show && ta(), P.value = !1;
581
+ }
582
+ const K = Ma(() => {
583
+ z.value = !0, Qe();
584
+ }, F.value > 200 ? 10 : 1, !z.value);
585
+ function sa(e) {
586
+ const { left: t } = S.value.getBoundingClientRect(), o = e.clientX - t;
587
+ if (o * 2 < l.value.left || o * 2 > l.value.right) {
588
+ q.value = !1, d.value = null;
589
+ return;
590
+ }
591
+ const i = o * 2 - l.value.left;
592
+ if (d.value = Math.floor(i / l.value.slot), q.value = !0, !z.value) return;
593
+ let v = "";
594
+ const f = a.value.style.chart.tooltip.customFormat;
595
+ He(f) && Sa(() => f({
596
+ seriesIndex: d.value,
597
+ datapoint: h.value.map((n) => ({
598
+ shape: n.shape || null,
599
+ name: n.name,
600
+ color: n.color,
601
+ type: n.type || "line",
602
+ value: n.series.find((g, L) => L === d.value)
603
+ })),
604
+ series: h.value,
605
+ config: a.value
606
+ })) ? J.value = f({
607
+ seriesIndex: d.value,
608
+ datapoint: h.value.map((n) => ({
609
+ shape: n.shape || null,
610
+ name: n.name,
611
+ color: n.color,
612
+ type: n.type || "line",
613
+ value: n.series.find((g, L) => L === d.value)
614
+ })),
615
+ series: h.value,
616
+ config: a.value
617
+ }) : (a.value.style.chart.grid.y.timeLabels.values.slice(u.value.start, u.value.end)[d.value] && (v += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${a.value.style.chart.grid.y.timeLabels.values.slice(u.value.start, u.value.end)[d.value]}</div>`), v += qe.value.join(""), J.value = v), z.value = !1;
618
+ }
619
+ le(() => d.value, (e) => {
620
+ K();
621
+ }), le(() => u.value, (e) => {
622
+ P.value = !0, ve();
623
+ }, {
624
+ deep: !0
625
+ }), le(() => r.value.showDataLabels, (e) => {
626
+ P.value = !0, ve();
627
+ }), le(() => r.value.stacked, (e) => {
628
+ P.value = !0, z.value = !0, K();
629
+ });
630
+ function na() {
631
+ q.value = !1, d.value = null, J.value = "";
632
+ }
633
+ const Q = c(null), ee = c(null);
634
+ da(() => {
635
+ if (Ca(N.dataset) ? wa({
636
+ componentName: "VueUiXyCanvas",
637
+ type: "dataset"
638
+ }) : S.value && (s.value = S.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
639
+ const e = Oa(() => {
640
+ const { width: t, height: o } = Ia({
641
+ chart: j.value,
642
+ title: a.value.style.chart.title.text ? xe.value : null,
643
+ legend: a.value.style.chart.legend.show ? Le.value : null,
644
+ slicer: a.value.style.chart.zoom.show && F.value > 1 ? ke.value : null
645
+ });
646
+ Ce.value = `${t} / ${o}`;
647
+ });
648
+ Q.value = new ResizeObserver(e), Q.value.observe(j.value.parentNode);
649
+ }
650
+ ee.value = new ResizeObserver((e) => {
651
+ for (const t of e)
652
+ t.contentBoxSize && D.value && (P.value = !0, K());
653
+ }), ee.value.observe(D.value);
654
+ }), ha(() => {
655
+ ee.value && ee.value.disconnect(), Q.value && Q.value.disconnect();
656
+ });
657
+ function Me(e) {
658
+ Ae("selectLegend", h.value.find((t) => t.absoluteIndex === e)), w.value.includes(e) ? w.value = w.value.filter((t) => t !== e) : w.value.push(e), P.value = !0, K();
659
+ }
660
+ const Re = b(() => H.value.map((e, t) => ({
661
+ ...e,
662
+ name: e.name,
663
+ color: De(e.color) || ze.value[t] || E[t] || E[t % E.length],
664
+ shape: e.shape || "circle",
665
+ prefix: e.prefix || "",
666
+ suffix: e.suffix || "",
667
+ rounding: e.rounding || 0
668
+ })).map((e) => ({
669
+ ...e,
670
+ opacity: w.value.includes(e.absoluteIndex) ? 0.5 : 1,
671
+ segregate: () => Me(e.absoluteIndex),
672
+ isSegregated: w.value.includes(e.absoluteIndex)
673
+ }))), ia = b(() => ({
674
+ cy: "donut-div-legend",
675
+ backgroundColor: a.value.style.chart.legend.backgroundColor,
676
+ color: a.value.style.chart.legend.color,
677
+ fontSize: a.value.style.chart.legend.fontSize,
678
+ paddingBottom: 12,
679
+ fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
680
+ })), ae = b(() => {
681
+ const e = [""].concat(h.value.map((v) => v.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
682
+ let t = [];
683
+ for (let v = 0; v < F.value; v += 1) {
684
+ const f = h.value.map((n) => n.series[v] ?? 0).reduce((n, g) => n + g, 0);
685
+ t.push([a.value.style.chart.grid.y.timeLabels.values.slice(u.value.start, u.value.end)[v] ?? v + 1].concat(h.value.map((n) => (n.series[v] ?? 0).toFixed(a.value.table.rounding))).concat((f ?? 0).toFixed(a.value.table.rounding)));
686
+ }
687
+ const o = {
688
+ th: {
689
+ backgroundColor: a.value.table.th.backgroundColor,
690
+ color: a.value.table.th.color,
691
+ outline: a.value.table.th.outline
692
+ },
693
+ td: {
694
+ backgroundColor: a.value.table.td.backgroundColor,
695
+ color: a.value.table.td.color,
696
+ outline: a.value.table.td.outline
697
+ },
698
+ breakpoint: a.value.table.responsiveBreakpoint
699
+ }, i = [a.value.table.columnNames.period].concat(h.value.map((v) => v.name)).concat(a.value.table.columnNames.total);
700
+ return { head: e, body: t.slice(0, u.value.end - u.value.start), config: o, colNames: i };
701
+ }), Oe = b(() => {
702
+ if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
703
+ const e = h.value.map((o) => ({
704
+ label: o.name,
705
+ color: o.color,
706
+ type: o.type
707
+ })), t = [];
708
+ for (let o = u.value.start; o < u.value.end; o += 1) {
709
+ const i = [a.value.style.chart.grid.y.timeLabels.values[o] || o + 1];
710
+ h.value.forEach((v) => {
711
+ i.push(Number((v.series[o] || 0).toFixed(a.value.table.rounding)));
712
+ }), t.push(i);
713
+ }
714
+ return { head: e, body: t };
715
+ });
716
+ function Ie() {
717
+ const e = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], t = ["", ...Oe.value.head.map((f) => f.label)], o = Oe.value.body, i = e.concat([t]).concat(o), v = za(i);
718
+ $a({ csvContent: v, title: a.value.style.chart.title.text || "vue-ui-xy-canvas" });
719
+ }
720
+ function va() {
721
+ return h.value;
722
+ }
723
+ function Pe() {
724
+ r.value.showTable = !r.value.showTable;
725
+ }
726
+ function Fe() {
727
+ r.value.showDataLabels = !r.value.showDataLabels;
728
+ }
729
+ function Ee() {
730
+ r.value.stacked = !r.value.stacked;
731
+ }
732
+ function Ne() {
733
+ r.value.showTooltip = !r.value.showTooltip;
734
+ }
735
+ return Ue({
736
+ getData: va,
737
+ generateCsv: Ie,
738
+ generatePdf: we,
739
+ generateImage: Se,
740
+ toggleTable: Pe,
741
+ toggleLabels: Fe,
742
+ toggleStack: Ee,
743
+ toggleTooltip: Ne
744
+ }), (e, t) => (O(), de("div", {
745
+ style: U(`width:100%; position: relative;${a.value.responsive ? "height: 100%" : ""}`),
746
+ ref_key: "xy",
747
+ ref: j,
748
+ id: `xy_canvas_${re.value}`,
749
+ class: ya(`vue-ui-donut ${ne.value ? "vue-data-ui-wrapper-fullscreen" : ""}`)
750
+ }, [
751
+ a.value.style.chart.title.text ? (O(), de("div", {
752
+ key: 0,
753
+ ref_key: "chartTitle",
754
+ ref: xe,
755
+ style: U(`width:100%;background:${a.value.style.chart.backgroundColor};`)
756
+ }, [
757
+ he(Ea, {
758
+ config: {
759
+ title: {
760
+ cy: "xy-canvas-title",
761
+ ...a.value.style.chart.title
762
+ },
763
+ subtitle: {
764
+ cy: "xy-canvas-subtitle",
765
+ ...a.value.style.chart.title.subtitle
766
+ }
767
+ }
768
+ }, null, 8, ["config"])
769
+ ], 4)) : te("", !0),
770
+ a.value.userOptions.show && ie.value ? (O(), A(Da, {
771
+ ref: "details",
772
+ key: `user_option_${me.value}`,
773
+ backgroundColor: a.value.style.chart.backgroundColor,
774
+ color: a.value.style.chart.color,
775
+ isPrinting: Y(Ze),
776
+ isImaging: Y(Ge),
777
+ uid: re.value,
778
+ hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
779
+ hasPdf: a.value.userOptions.buttons.pdf,
780
+ hasImg: a.value.userOptions.buttons.img,
781
+ hasXls: a.value.userOptions.buttons.csv,
782
+ hasLabel: a.value.userOptions.buttons.labels,
783
+ hasStack: ge.dataset.length > 1 && a.value.userOptions.buttons.stack,
784
+ hasFullscreen: a.value.userOptions.buttons.fullscreen,
785
+ hasTable: u.value.end - u.value.start < 200 && a.value.userOptions.buttons.table,
786
+ isFullscreen: ne.value,
787
+ isTooltip: r.value.showTooltip,
788
+ isStacked: r.value.stacked,
789
+ titles: { ...a.value.userOptions.buttonTitles },
790
+ chartElement: j.value,
791
+ onToggleFullscreen: Ve,
792
+ onGeneratePdf: Y(we),
793
+ onGenerateCsv: Ie,
794
+ onGenerateImage: Y(Se),
795
+ onToggleTable: Pe,
796
+ onToggleLabels: Fe,
797
+ onToggleStack: Ee,
798
+ onToggleTooltip: Ne
799
+ }, fa({ _: 2 }, [
800
+ e.$slots.optionTooltip ? {
801
+ name: "optionTooltip",
802
+ fn: m(() => [
803
+ C(e.$slots, "optionTooltip", {}, void 0, !0)
804
+ ]),
805
+ key: "0"
806
+ } : void 0,
807
+ e.$slots.optionPdf ? {
808
+ name: "optionPdf",
809
+ fn: m(() => [
810
+ C(e.$slots, "optionPdf", {}, void 0, !0)
811
+ ]),
812
+ key: "1"
813
+ } : void 0,
814
+ e.$slots.optionCsv ? {
815
+ name: "optionCsv",
816
+ fn: m(() => [
817
+ C(e.$slots, "optionCsv", {}, void 0, !0)
818
+ ]),
819
+ key: "2"
820
+ } : void 0,
821
+ e.$slots.optionImg ? {
822
+ name: "optionImg",
823
+ fn: m(() => [
824
+ C(e.$slots, "optionImg", {}, void 0, !0)
825
+ ]),
826
+ key: "3"
827
+ } : void 0,
828
+ e.$slots.optionTable ? {
829
+ name: "optionTable",
830
+ fn: m(() => [
831
+ C(e.$slots, "optionTable", {}, void 0, !0)
832
+ ]),
833
+ key: "4"
834
+ } : void 0,
835
+ e.$slots.optionLabels ? {
836
+ name: "optionLabels",
837
+ fn: m(() => [
838
+ C(e.$slots, "optionLabels", {}, void 0, !0)
839
+ ]),
840
+ key: "5"
841
+ } : void 0,
842
+ e.$slots.optionStack ? {
843
+ name: "optionStack",
844
+ fn: m(() => [
845
+ C(e.$slots, "optionStack", {}, void 0, !0)
846
+ ]),
847
+ key: "6"
848
+ } : void 0,
849
+ e.$slots.optionFullscreen ? {
850
+ name: "optionFullscreen",
851
+ fn: m(({ toggleFullscreen: o, isFullscreen: i }) => [
852
+ C(e.$slots, "optionFullscreen", oe(ue({ toggleFullscreen: o, isFullscreen: i })), void 0, !0)
853
+ ]),
854
+ key: "7"
855
+ } : void 0
856
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : te("", !0),
857
+ Z("div", {
858
+ class: "vue-ui-xy-canvas",
859
+ style: U(`position: relative; aspect-ratio: ${Ce.value}`),
860
+ ref_key: "container",
861
+ ref: D
862
+ }, [
863
+ ie.value ? (O(), de("canvas", {
864
+ key: 0,
865
+ ref_key: "canvas",
866
+ ref: S,
867
+ style: { width: "100%", height: "100%" },
868
+ onMousemove: t[0] || (t[0] = (o) => sa(o)),
869
+ onMouseleave: na
870
+ }, null, 544)) : (O(), A(Ba, {
871
+ key: 1,
872
+ config: {
873
+ type: "line",
874
+ style: {
875
+ backgroundColor: a.value.style.chart.backgroundColor,
876
+ line: {
877
+ axis: {
878
+ color: "#CCCCCC"
879
+ },
880
+ path: {
881
+ color: "#CCCCCC",
882
+ strokeWidth: 0.5
883
+ }
884
+ }
885
+ }
886
+ }
887
+ }, null, 8, ["config"])),
888
+ he(Pa, {
889
+ show: r.value.showTooltip && q.value,
890
+ backgroundColor: a.value.style.chart.tooltip.backgroundColor,
891
+ color: a.value.style.chart.tooltip.color,
892
+ fontSize: a.value.style.chart.tooltip.fontSize,
893
+ borderRadius: a.value.style.chart.tooltip.borderRadius,
894
+ borderColor: a.value.style.chart.tooltip.borderColor,
895
+ borderWidth: a.value.style.chart.tooltip.borderWidth,
896
+ parent: S.value,
897
+ content: J.value,
898
+ backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
899
+ isCustom: Y(He)(a.value.style.chart.tooltip.customFormat)
900
+ }, {
901
+ "tooltip-before": m(() => [
902
+ C(e.$slots, "tooltip-before", oe(ue({ ...pe.value })), void 0, !0)
903
+ ]),
904
+ "tooltip-after": m(() => [
905
+ C(e.$slots, "tooltip-after", oe(ue({ ...pe.value })), void 0, !0)
906
+ ]),
907
+ _: 3
908
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "parent", "content", "backgroundOpacity", "isCustom"])
909
+ ], 4),
910
+ Z("div", {
911
+ ref_key: "chartSlicer",
912
+ ref: ke,
913
+ style: U(`width:100%;background:${a.value.style.chart.backgroundColor}`),
914
+ "data-html2canvas-ignore": ""
915
+ }, [
916
+ a.value.style.chart.zoom.show && F.value > 1 ? (O(), A(Na, {
917
+ key: `slicer_${be.value}`,
918
+ background: a.value.style.chart.zoom.color,
919
+ borderColor: a.value.style.chart.backgroundColor,
920
+ fontSize: a.value.style.chart.zoom.fontSize,
921
+ useResetSlot: a.value.style.chart.zoom.useResetSlot,
922
+ labelLeft: a.value.style.chart.grid.y.timeLabels.values[u.value.start] ? a.value.style.chart.grid.y.timeLabels.values[u.value.start] : "",
923
+ labelRight: a.value.style.chart.grid.y.timeLabels.values[u.value.end - 1] ? a.value.style.chart.grid.y.timeLabels.values[u.value.end - 1] : "",
924
+ textColor: a.value.style.chart.color,
925
+ inputColor: a.value.style.chart.zoom.color,
926
+ selectColor: a.value.style.chart.zoom.highlightColor,
927
+ max: F.value,
928
+ min: 0,
929
+ valueStart: u.value.start,
930
+ valueEnd: u.value.end,
931
+ start: u.value.start,
932
+ "onUpdate:start": t[1] || (t[1] = (o) => u.value.start = o),
933
+ end: u.value.end,
934
+ "onUpdate:end": t[2] || (t[2] = (o) => u.value.end = o),
935
+ onReset: Je
936
+ }, {
937
+ "reset-action": m(({ reset: o }) => [
938
+ C(e.$slots, "reset-action", oe(ue({ reset: o })), void 0, !0)
939
+ ]),
940
+ _: 3
941
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) : te("", !0)
942
+ ], 4),
943
+ Z("div", {
944
+ ref_key: "chartLegend",
945
+ ref: Le
946
+ }, [
947
+ a.value.style.chart.legend.show && ie.value ? (O(), A(Fa, {
948
+ key: 0,
949
+ legendSet: Re.value,
950
+ config: ia.value,
951
+ onClickMarker: t[3] || (t[3] = ({ i: o }) => Me(o))
952
+ }, {
953
+ item: m(({ legend: o, index: i }) => [
954
+ Z("div", {
955
+ onClick: (v) => o.segregate(),
956
+ style: U(`opacity:${w.value.includes(i) ? 0.5 : 1}`)
957
+ }, _e(o.name), 13, Aa)
958
+ ]),
959
+ _: 1
960
+ }, 8, ["legendSet", "config"])) : C(e.$slots, "legend", {
961
+ key: 1,
962
+ legend: Re.value
963
+ }, void 0, !0)
964
+ ], 512),
965
+ u.value.end - u.value.start < 200 ? (O(), A(Ha, {
966
+ key: 2,
967
+ hideDetails: "",
968
+ config: {
969
+ open: r.value.showTable,
970
+ maxHeight: 1e4,
971
+ body: {
972
+ backgroundColor: a.value.style.chart.backgroundColor,
973
+ color: a.value.style.chart.color
974
+ },
975
+ head: {
976
+ backgroundColor: a.value.style.chart.backgroundColor,
977
+ color: a.value.style.chart.color
978
+ }
979
+ }
980
+ }, {
981
+ content: m(() => [
982
+ he(Wa, {
983
+ colNames: ae.value.colNames,
984
+ head: ae.value.head,
985
+ body: ae.value.body,
986
+ config: ae.value.config,
987
+ title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
988
+ onClose: t[4] || (t[4] = (o) => r.value.showTable = !1)
989
+ }, {
990
+ th: m(({ th: o }) => [
991
+ Z("div", { innerHTML: o }, null, 8, Ya)
992
+ ]),
993
+ td: m(({ td: o }) => [
994
+ ga(_e(o), 1)
995
+ ]),
996
+ _: 1
997
+ }, 8, ["colNames", "head", "body", "config", "title"])
998
+ ]),
999
+ _: 1
1000
+ }, 8, ["config"])) : te("", !0)
1001
+ ], 14, Ua));
1002
+ }
1003
+ }, rl = /* @__PURE__ */ Xa(Za, [["__scopeId", "data-v-8ae56fe6"]]);
1004
+ export {
1005
+ rl as default
1006
+ };