vue-data-ui 3.19.6 → 3.19.8

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 (157) hide show
  1. package/dist/{BaseDraggableDialog-BQcmQAK5.js → BaseDraggableDialog-DUUu2E2Q.js} +1 -1
  2. package/dist/{BaseIcon-CEmt3Ifx.js → BaseIcon-DM1x8hQF.js} +6 -3
  3. package/dist/{BaseLegendToggle-DUIqQmwM.js → BaseLegendToggle-CJTwLGXL.js} +1 -1
  4. package/dist/{BaseZoomControls-Ce1yqas1.js → BaseZoomControls-BkajQ8q9.js} +1 -1
  5. package/dist/{ColorPicker-DS_QkH3W.js → ColorPicker-DTQeqKUV.js} +1 -1
  6. package/dist/{DataTable-BvDJEAma.js → DataTable-DmE8Oo4i.js} +1 -1
  7. package/dist/{NonSvgPenAndPaper-D4Gh7O43.js → NonSvgPenAndPaper-tvWXeCsd.js} +2 -2
  8. package/dist/{PackageVersion-C7CvErYQ.js → PackageVersion-zJAUEmyB.js} +1 -1
  9. package/dist/{PenAndPaper-DwpL8Z0l.js → PenAndPaper-DNgm6y3l.js} +2 -2
  10. package/dist/{Slicer-BlfyiHHD.js → Slicer-CPWGgGSp.js} +1 -1
  11. package/dist/{SlicerPreview-CG1jpZqZ.js → SlicerPreview-BU3ZeHjR.js} +1 -1
  12. package/dist/{UserOptions-B57xo6D2.js → UserOptions-D7zR0tnR.js} +1 -1
  13. package/dist/components/vue-ui-3d-bar.js +1 -1
  14. package/dist/components/vue-ui-accordion.js +1 -1
  15. package/dist/components/vue-ui-age-pyramid.js +1 -1
  16. package/dist/components/vue-ui-annotator.js +1 -1
  17. package/dist/components/vue-ui-bullet.js +1 -1
  18. package/dist/components/vue-ui-bump.js +1 -1
  19. package/dist/components/vue-ui-candlestick.js +1 -1
  20. package/dist/components/vue-ui-carousel-table.js +1 -1
  21. package/dist/components/vue-ui-chestnut.js +1 -1
  22. package/dist/components/vue-ui-chord.js +1 -1
  23. package/dist/components/vue-ui-circle-pack.js +1 -1
  24. package/dist/components/vue-ui-cursor.js +1 -1
  25. package/dist/components/vue-ui-dag.js +1 -1
  26. package/dist/components/vue-ui-dashboard.js +1 -1
  27. package/dist/components/vue-ui-digits.js +1 -1
  28. package/dist/components/vue-ui-donut-evolution.js +1 -1
  29. package/dist/components/vue-ui-donut.js +1 -1
  30. package/dist/components/vue-ui-dumbbell.js +1 -1
  31. package/dist/components/vue-ui-flow.js +1 -1
  32. package/dist/components/vue-ui-funnel.js +1 -1
  33. package/dist/components/vue-ui-galaxy.js +1 -1
  34. package/dist/components/vue-ui-gauge.js +1 -1
  35. package/dist/components/vue-ui-geo.js +1 -1
  36. package/dist/components/vue-ui-gizmo.js +1 -1
  37. package/dist/components/vue-ui-heatmap.js +1 -1
  38. package/dist/components/vue-ui-history-plot.js +1 -1
  39. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  40. package/dist/components/vue-ui-icon.js +1 -1
  41. package/dist/components/vue-ui-kpi.js +1 -1
  42. package/dist/components/vue-ui-mini-loader.js +1 -1
  43. package/dist/components/vue-ui-molecule.js +1 -1
  44. package/dist/components/vue-ui-mood-radar.js +1 -1
  45. package/dist/components/vue-ui-nested-donuts.js +1 -1
  46. package/dist/components/vue-ui-onion.js +1 -1
  47. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  48. package/dist/components/vue-ui-quadrant.js +1 -1
  49. package/dist/components/vue-ui-quick-chart.js +1 -1
  50. package/dist/components/vue-ui-radar.js +1 -1
  51. package/dist/components/vue-ui-rating.js +1 -1
  52. package/dist/components/vue-ui-relation-circle.js +1 -1
  53. package/dist/components/vue-ui-ridgeline.js +1 -1
  54. package/dist/components/vue-ui-rings.js +1 -1
  55. package/dist/components/vue-ui-scatter.js +1 -1
  56. package/dist/components/vue-ui-skeleton.js +1 -1
  57. package/dist/components/vue-ui-smiley.js +1 -1
  58. package/dist/components/vue-ui-spark-trend.js +1 -1
  59. package/dist/components/vue-ui-sparkbar.js +1 -1
  60. package/dist/components/vue-ui-sparkgauge.js +1 -1
  61. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  62. package/dist/components/vue-ui-sparkline.js +1 -1
  63. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  64. package/dist/components/vue-ui-stackbar.js +1 -1
  65. package/dist/components/vue-ui-stackline.js +1 -1
  66. package/dist/components/vue-ui-strip-plot.js +1 -1
  67. package/dist/components/vue-ui-table-heatmap.js +1 -1
  68. package/dist/components/vue-ui-table-sparkline.js +1 -1
  69. package/dist/components/vue-ui-table.js +1 -1
  70. package/dist/components/vue-ui-thermometer.js +1 -1
  71. package/dist/components/vue-ui-timer.js +1 -1
  72. package/dist/components/vue-ui-tiremarks.js +1 -1
  73. package/dist/components/vue-ui-treemap.js +1 -1
  74. package/dist/components/vue-ui-vertical-bar.js +1 -1
  75. package/dist/components/vue-ui-waffle.js +1 -1
  76. package/dist/components/vue-ui-wheel.js +1 -1
  77. package/dist/components/vue-ui-word-cloud.js +1 -1
  78. package/dist/components/vue-ui-world.js +1 -1
  79. package/dist/components/vue-ui-xy-canvas.js +1 -1
  80. package/dist/components/vue-ui-xy.js +1 -1
  81. package/dist/style.css +1 -1
  82. package/dist/types/vue-data-ui.d.ts +11 -0
  83. package/dist/{useConfig-lKgU652n.js → useConfig-ByaaSKhz.js} +5 -0
  84. package/dist/{useObjectBindings-C3q0I8Zm.js → useObjectBindings-BR1sGimd.js} +1 -1
  85. package/dist/utils.js +1 -1
  86. package/dist/{vue-data-ui-BBnKbdCT.js → vue-data-ui-Dv8MNDbS.js} +68 -68
  87. package/dist/vue-data-ui.js +69 -69
  88. package/dist/{vue-ui-3d-bar-gMuK6OMP.js → vue-ui-3d-bar-DVsF4qGd.js} +2 -2
  89. package/dist/{vue-ui-accordion-CNtzLReQ.js → vue-ui-accordion-BX9WL-QF.js} +2 -2
  90. package/dist/{vue-ui-age-pyramid-B_D1wPY4.js → vue-ui-age-pyramid-Bu3bocZx.js} +2 -2
  91. package/dist/{vue-ui-annotator-KPkeXw8q.js → vue-ui-annotator-Be3VpH8Z.js} +4 -4
  92. package/dist/{vue-ui-bullet-Ci3tqx6A.js → vue-ui-bullet-COSSZ7RU.js} +2 -2
  93. package/dist/{vue-ui-bump-31Kryh02.js → vue-ui-bump-C1w-a4ad.js} +3 -3
  94. package/dist/vue-ui-candlestick-zO0Jmsen.js +1826 -0
  95. package/dist/{vue-ui-carousel-table-D3j0UTQ1.js → vue-ui-carousel-table-Q2uTIELA.js} +2 -2
  96. package/dist/{vue-ui-chestnut-Cgf0vAxo.js → vue-ui-chestnut-DdNKhXkN.js} +2 -2
  97. package/dist/{vue-ui-chord-DGma5NsS.js → vue-ui-chord-CYzGIRtA.js} +2 -2
  98. package/dist/{vue-ui-circle-pack-EvRfcXnZ.js → vue-ui-circle-pack-Dp5_ugXW.js} +2 -2
  99. package/dist/{vue-ui-cursor-BX8kHXVE.js → vue-ui-cursor-DBViygOD.js} +2 -2
  100. package/dist/{vue-ui-dag-DuOokTx4.js → vue-ui-dag-BA2vr2Ub.js} +3 -3
  101. package/dist/{vue-ui-dashboard-BeZCujZv.js → vue-ui-dashboard-D11FCHnp.js} +67 -67
  102. package/dist/{vue-ui-digits-nIgbeL-K.js → vue-ui-digits-CIXbRR97.js} +2 -2
  103. package/dist/{vue-ui-donut-FzQwgIbN.js → vue-ui-donut-BSanYbqb.js} +3 -3
  104. package/dist/{vue-ui-donut-evolution-CwLYRDws.js → vue-ui-donut-evolution-BVttNIzH.js} +228 -218
  105. package/dist/{vue-ui-dumbbell-BmujSKH2.js → vue-ui-dumbbell-D-KcBLOF.js} +2 -2
  106. package/dist/{vue-ui-flow-D4jeyY5a.js → vue-ui-flow-Dly7N0Nb.js} +2 -2
  107. package/dist/{vue-ui-funnel-DQ1fOfXW.js → vue-ui-funnel-COwXzAbB.js} +2 -2
  108. package/dist/{vue-ui-galaxy-Wldw6HHG.js → vue-ui-galaxy-Cg9VStNF.js} +3 -3
  109. package/dist/{vue-ui-gauge-BzV3y_h3.js → vue-ui-gauge-DHWCS6jR.js} +2 -2
  110. package/dist/{vue-ui-geo-WLEkf2a9.js → vue-ui-geo-CV0FBeuB.js} +3 -3
  111. package/dist/{vue-ui-gizmo-C0vr-wLL.js → vue-ui-gizmo-5rdIvscj.js} +2 -2
  112. package/dist/{vue-ui-heatmap-RmaAnr9m.js → vue-ui-heatmap-kiQ6q3q4.js} +3 -3
  113. package/dist/{vue-ui-history-plot-Dyf2Atb2.js → vue-ui-history-plot-CgPjudHv.js} +3 -3
  114. package/dist/{vue-ui-horizontal-bar-DG4paRTj.js → vue-ui-horizontal-bar-CpQCmBQD.js} +4 -4
  115. package/dist/{vue-ui-kpi-TBQhSM0a.js → vue-ui-kpi-Bz7QeCTV.js} +2 -2
  116. package/dist/{vue-ui-mini-loader-BpLz9pDO.js → vue-ui-mini-loader-DDJUya9e.js} +1 -1
  117. package/dist/{vue-ui-molecule-Df4zCHL5.js → vue-ui-molecule-CvfwMxYY.js} +2 -2
  118. package/dist/{vue-ui-mood-radar-RQqmJU_9.js → vue-ui-mood-radar-D0lanJ__.js} +2 -2
  119. package/dist/{vue-ui-nested-donuts-C7VIp7mz.js → vue-ui-nested-donuts-C-LWBXmg.js} +3 -3
  120. package/dist/{vue-ui-onion-DP4NWU3Y.js → vue-ui-onion-u9hGe4VA.js} +3 -3
  121. package/dist/{vue-ui-parallel-coordinate-plot-a7OvbsVh.js → vue-ui-parallel-coordinate-plot-BJ5OjYTH.js} +3 -3
  122. package/dist/{vue-ui-quadrant-C4GxyyE3.js → vue-ui-quadrant-BVFJ5Vur.js} +3 -3
  123. package/dist/{vue-ui-quick-chart-BNCkZiiG.js → vue-ui-quick-chart-Cd5lGyph.js} +4 -4
  124. package/dist/{vue-ui-radar-Dcq3bWA4.js → vue-ui-radar-BsRGxgXN.js} +3 -3
  125. package/dist/{vue-ui-rating-DBxf9Vwv.js → vue-ui-rating-D_QR_A3V.js} +1 -1
  126. package/dist/{vue-ui-relation-circle-CZ1UtEIM.js → vue-ui-relation-circle-MxYh6hSt.js} +2 -2
  127. package/dist/{vue-ui-ridgeline-CsNDB48W.js → vue-ui-ridgeline-BtNEP6ba.js} +3 -3
  128. package/dist/{vue-ui-rings-Bwd_i2eo.js → vue-ui-rings-Pj7yMeOV.js} +3 -3
  129. package/dist/{vue-ui-scatter-DAa8MnhH.js → vue-ui-scatter-DrS1nrwL.js} +3 -3
  130. package/dist/{vue-ui-skeleton-CPy9DsSC.js → vue-ui-skeleton-Cqv1KG4y.js} +2 -2
  131. package/dist/{vue-ui-smiley-2xc8AwPP.js → vue-ui-smiley-rFdGxZK6.js} +1 -1
  132. package/dist/{vue-ui-spark-trend-CM06cEvG.js → vue-ui-spark-trend-eHleRq-z.js} +2 -2
  133. package/dist/{vue-ui-sparkbar-CSDRWMhb.js → vue-ui-sparkbar-BHJTG_on.js} +2 -2
  134. package/dist/{vue-ui-sparkgauge-CKeKTyBH.js → vue-ui-sparkgauge-DpAEwvLX.js} +2 -2
  135. package/dist/{vue-ui-sparkhistogram-BSnU2_Q0.js → vue-ui-sparkhistogram-BlMH_NJk.js} +2 -2
  136. package/dist/{vue-ui-sparkline-DhkrfLYf.js → vue-ui-sparkline-BAWc3ROJ.js} +2 -2
  137. package/dist/{vue-ui-sparkstackbar-D3vn49rn.js → vue-ui-sparkstackbar-BI8zG-DG.js} +3 -3
  138. package/dist/vue-ui-stackbar-28FVVqVu.js +2267 -0
  139. package/dist/vue-ui-stackline-DwtlEdOE.js +2395 -0
  140. package/dist/{vue-ui-strip-plot-DLH2Jc91.js → vue-ui-strip-plot-DX36qFKk.js} +2 -2
  141. package/dist/{vue-ui-table-DBWGRgw6.js → vue-ui-table-DdZ_DkqT.js} +5 -5
  142. package/dist/{vue-ui-table-heatmap-D0SM6A1L.js → vue-ui-table-heatmap-BFKyJTr1.js} +2 -2
  143. package/dist/{vue-ui-table-sparkline-BShpt1UR.js → vue-ui-table-sparkline-BSV1jn7r.js} +2 -2
  144. package/dist/{vue-ui-thermometer-BIH00QYu.js → vue-ui-thermometer-Io8LdW1o.js} +2 -2
  145. package/dist/{vue-ui-timer-vcaC2CGp.js → vue-ui-timer-BkdpZ-lw.js} +3 -3
  146. package/dist/{vue-ui-tiremarks-BmhvsqeP.js → vue-ui-tiremarks-GC773Hw1.js} +2 -2
  147. package/dist/{vue-ui-treemap-C-M5PHTS.js → vue-ui-treemap-C0dtbfbZ.js} +4 -4
  148. package/dist/{vue-ui-waffle-DnpUe9aj.js → vue-ui-waffle-BvzfNmJC.js} +3 -3
  149. package/dist/{vue-ui-wheel-D21hTOn0.js → vue-ui-wheel-Dm9V8TAH.js} +2 -2
  150. package/dist/{vue-ui-word-cloud-C4SPxSlX.js → vue-ui-word-cloud-Ne_B9Elc.js} +3 -3
  151. package/dist/{vue-ui-world-DSq_cPCv.js → vue-ui-world-Bp38MZij.js} +3 -3
  152. package/dist/{vue-ui-xy-Iep0AjyV.js → vue-ui-xy-BCeOqJYR.js} +1169 -1104
  153. package/dist/{vue-ui-xy-canvas-DjTurM4m.js → vue-ui-xy-canvas-B06Rit63.js} +6 -6
  154. package/package.json +1 -1
  155. package/dist/vue-ui-candlestick-DU0MXtKT.js +0 -1814
  156. package/dist/vue-ui-stackbar-BR7tZmWR.js +0 -2253
  157. package/dist/vue-ui-stackline-Dj9N60Js.js +0 -2381
@@ -1,2253 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { B as t, Ft as n, G as r, H as a, It as o, J as s, Lt as c, S as l, St as u, Tt as d, V as ee, X as f, et as p, g as te, h as ne, i as m, nt as re, ot as ie, pt as ae, r as oe, s as se, t as ce, x as le, y as ue, yt as de, zt as fe } from "./lib-BkiwukKO.js";
3
- import { n as pe, r as me, t as he } from "./useTimeLabels-C0x7zUXP.js";
4
- import { t as ge } from "./useConfig-lKgU652n.js";
5
- import { t as _e } from "./usePrinter-X0yWOynH.js";
6
- import { n as ve, t as ye } from "./BaseScanner-C7dmAref.js";
7
- import { t as be } from "./useSvgExport-Dtu973wa.js";
8
- import { t as xe } from "./useNestedProp-Ck4hsrpu.js";
9
- import { t as Se } from "./useThemeCheck-rFK9Zlb_.js";
10
- import { t as Ce } from "./useStableElementSize-0I1IpHPl.js";
11
- import { t as we } from "./useTimeLabelCollider-Dm55Emzg.js";
12
- import { t as Te } from "./img-BjOr008R.js";
13
- import { n as Ee } from "./Title-__gWq2g6.js";
14
- import { t as De } from "./Shape-DEGOZ6GG.js";
15
- import { t as Oe } from "./_plugin-vue_export-helper-Dq1MygBL.js";
16
- import { c as ke } from "./canvas-lib-DTaADQOK.js";
17
- import { t as Ae } from "./useResponsive-CrAInupd.js";
18
- import { t as je } from "./SlicerPreview-CG1jpZqZ.js";
19
- import { t as Me } from "./BaseLegendToggle-DUIqQmwM.js";
20
- import { t as Ne } from "./A11yDataTable-q2-8fSlJ.js";
21
- import { t as Pe } from "./useUserOptionState-CjPJPTg2.js";
22
- import { t as Fe } from "./useChartAccessibility-Do37qcw2.js";
23
- import { t as Ie } from "./Legend-Gg5Q4Clb.js";
24
- import { t as Le } from "./vue_ui_stackbar-BW_C3MXw.js";
25
- import { Fragment as h, Teleport as Re, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as ze, createTextVNode as Be, createVNode as Ve, defineAsyncComponent as x, guardReactiveProps as S, mergeProps as He, nextTick as Ue, normalizeClass as We, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as Ge, onMounted as Ke, openBlock as T, ref as E, renderList as D, renderSlot as O, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as k, toRefs as Ye, unref as A, useSlots as Xe, watch as Ze, watchEffect as Qe, withCtx as j } from "vue";
26
- //#region src/components/vue-ui-stackbar.vue
27
- var $e = /* @__PURE__ */ e({ default: () => Qt }), et = ["id"], tt = ["id"], nt = ["id"], rt = { style: { position: "relative" } }, it = [
28
- "xmlns",
29
- "aria-describedby",
30
- "viewBox"
31
- ], at = [
32
- "x",
33
- "y",
34
- "width",
35
- "height"
36
- ], ot = { key: 1 }, st = ["id"], ct = ["stop-color"], lt = ["stop-color"], ut = ["stop-color"], dt = [
37
- "x",
38
- "y",
39
- "width",
40
- "height",
41
- "stroke",
42
- "stroke-width",
43
- "stroke-linecap",
44
- "stroke-linejoin",
45
- "stroke-dasharray"
46
- ], ft = [
47
- "x1",
48
- "x2",
49
- "y1",
50
- "y2",
51
- "stroke",
52
- "stroke-width",
53
- "stroke-dasharray"
54
- ], pt = [
55
- "x1",
56
- "x2",
57
- "y1",
58
- "y2",
59
- "stroke",
60
- "stroke-width",
61
- "stroke-dasharray"
62
- ], mt = [
63
- "x1",
64
- "x2",
65
- "y1",
66
- "y2",
67
- "stroke",
68
- "stroke-width",
69
- "stroke-dasharray"
70
- ], ht = [
71
- "x1",
72
- "x2",
73
- "y1",
74
- "y2",
75
- "stroke",
76
- "stroke-width",
77
- "stroke-dasharray"
78
- ], gt = { key: 0 }, _t = [
79
- "x",
80
- "y",
81
- "height",
82
- "rx",
83
- "width",
84
- "fill",
85
- "stroke",
86
- "stroke-width"
87
- ], vt = { key: 0 }, yt = [
88
- "x",
89
- "y",
90
- "height",
91
- "rx",
92
- "width",
93
- "fill",
94
- "stroke",
95
- "stroke-width"
96
- ], bt = [
97
- "x",
98
- "y",
99
- "width",
100
- "rx",
101
- "height",
102
- "fill",
103
- "stroke",
104
- "stroke-width"
105
- ], xt = { key: 0 }, St = [
106
- "x",
107
- "y",
108
- "width",
109
- "rx",
110
- "height",
111
- "fill",
112
- "stroke",
113
- "stroke-width"
114
- ], Ct = [
115
- "x1",
116
- "x2",
117
- "y1",
118
- "y2",
119
- "stroke",
120
- "stroke-width"
121
- ], wt = [
122
- "x1",
123
- "x2",
124
- "y1",
125
- "y2",
126
- "stroke",
127
- "stroke-width"
128
- ], Tt = [
129
- "x",
130
- "y",
131
- "font-size",
132
- "fill",
133
- "font-weight"
134
- ], Et = [
135
- "transform",
136
- "font-size",
137
- "fill",
138
- "font-weight"
139
- ], Dt = [
140
- "x",
141
- "y",
142
- "font-size",
143
- "fill",
144
- "font-weight"
145
- ], Ot = [
146
- "x",
147
- "y",
148
- "font-size",
149
- "font-weight",
150
- "fill"
151
- ], kt = [
152
- "x",
153
- "y",
154
- "font-size",
155
- "fill",
156
- "font-weight"
157
- ], At = [
158
- "x",
159
- "y",
160
- "font-size",
161
- "font-weight",
162
- "fill"
163
- ], jt = [
164
- "x1",
165
- "x2",
166
- "y1",
167
- "y2",
168
- "stroke"
169
- ], Mt = [
170
- "x",
171
- "y",
172
- "font-size",
173
- "font-weight",
174
- "fill"
175
- ], Nt = [
176
- "x1",
177
- "x2",
178
- "y1",
179
- "y2",
180
- "stroke"
181
- ], Pt = [
182
- "font-size",
183
- "font-weight",
184
- "fill",
185
- "text-anchor",
186
- "transform"
187
- ], Ft = { key: 0 }, It = { key: 1 }, Lt = [
188
- "text-anchor",
189
- "font-size",
190
- "font-weight",
191
- "fill",
192
- "transform",
193
- "onClick"
194
- ], Rt = [
195
- "text-anchor",
196
- "font-size",
197
- "fill",
198
- "transform",
199
- "innerHTML",
200
- "onClick"
201
- ], zt = { key: 0 }, Bt = { key: 1 }, Vt = [
202
- "font-size",
203
- "font-weight",
204
- "fill",
205
- "x",
206
- "y",
207
- "onClick"
208
- ], Ht = [
209
- "font-size",
210
- "font-weight",
211
- "fill",
212
- "x",
213
- "y",
214
- "onClick",
215
- "innerHTML"
216
- ], Ut = [
217
- "x",
218
- "y",
219
- "width",
220
- "height",
221
- "onClick",
222
- "onMouseenter",
223
- "onMouseleave",
224
- "fill"
225
- ], Wt = [
226
- "x",
227
- "y",
228
- "width",
229
- "height",
230
- "onClick",
231
- "onMouseenter",
232
- "onMouseleave",
233
- "fill"
234
- ], Gt = ["data-start", "data-end"], Kt = {
235
- key: 0,
236
- style: {
237
- position: "absolute",
238
- top: "100%",
239
- left: "0",
240
- width: "100%"
241
- },
242
- "data-dom-to-png-ignore": "",
243
- "aria-hidden": "true"
244
- }, qt = {
245
- key: 4,
246
- class: "vue-data-ui-watermark"
247
- }, Jt = [
248
- "x",
249
- "y",
250
- "height",
251
- "width",
252
- "fill",
253
- "stroke"
254
- ], Yt = ["id"], Xt = ["onClick"], Zt = ["innerHTML"], Qt = /* @__PURE__ */ Oe({
255
- __name: "vue-ui-stackbar",
256
- props: {
257
- config: {
258
- type: Object,
259
- default() {
260
- return {};
261
- }
262
- },
263
- dataset: {
264
- type: Array,
265
- default() {
266
- return [];
267
- }
268
- },
269
- selectedXIndex: {
270
- type: Number,
271
- default: void 0
272
- }
273
- },
274
- emits: [
275
- "selectDatapoint",
276
- "selectLegend",
277
- "selectTimeLabel",
278
- "selectX",
279
- "copyAlt"
280
- ],
281
- setup(e, { expose: Oe, emit: $e }) {
282
- let Qt = x(() => import("./Tooltip-CuWEYGr3.js")), $t = x(() => import("./BaseIcon-CEmt3Ifx.js").then((e) => e.n)), en = x(() => import("./vue-ui-accordion-CNtzLReQ.js").then((e) => e.n)), tn = x(() => import("./DataTable-BvDJEAma.js")), nn = x(() => import("./PenAndPaper-DwpL8Z0l.js").then((e) => e.t)), rn = x(() => import("./UserOptions-B57xo6D2.js").then((e) => e.n)), an = x(() => import("./PackageVersion-C7CvErYQ.js").then((e) => e.t)), on = x(() => import("./BaseDraggableDialog-BQcmQAK5.js").then((e) => e.n)), { vue_ui_stackbar: sn } = ge(), { isThemeValid: cn, warnInvalidTheme: ln } = Se(), un = Xe(), M = e, N = $e, dn = g({
283
- get() {
284
- return !!M.dataset && M.dataset.length;
285
- },
286
- set(e) {
287
- return e;
288
- }
289
- }), P = E(null), F = E(a()), fn = E(!1), pn = E(null), mn = E(""), I = E([]), hn = E(0), gn = E(null), _n = E(null), vn = E(null), yn = E(null), bn = E(!1), L = E(null), xn = E(!1), Sn = E(0), Cn = E(0), wn = E(0), Tn = E(!1), En = E(null), Dn = E(null), On = E(!1), kn = E(!1), An = E(null), jn = E(null), Mn = E(null), R = E(null), Nn = E(null), Pn = E(null), Fn = Je(null), In = E(!1), Ln = E(0), Rn = E(0), z = E(null), zn = E({
290
- x: 0,
291
- y: 0
292
- }), Bn = E("pointer"), Vn = Ce({
293
- elementRef: Fn,
294
- minimumWidth: 2,
295
- minimumHeight: 2,
296
- stableFramesRequired: 2,
297
- once: !1,
298
- onSizeAccepted: () => {
299
- Wn();
300
- }
301
- });
302
- function Hn() {
303
- Fn.value = P.value?.parentNode ?? null;
304
- }
305
- function Un() {
306
- return new Promise((e) => {
307
- requestAnimationFrame(() => {
308
- requestAnimationFrame(e);
309
- });
310
- });
311
- }
312
- async function Wn() {
313
- let e = ++Rn.value;
314
- In.value = !1, await Ue(), await Un(), await Un(), e === Rn.value && (Ln.value += 1, In.value = !0);
315
- }
316
- let Gn = E(null);
317
- Ke(() => {
318
- Tn.value = !0, Hn(), Vn.start(), pr();
319
- });
320
- let B = E(nr()), V = g(() => B.value.userOptions.useCursorPointer), Kn = g(() => fe({
321
- defaultConfig: {
322
- userOptions: { show: !1 },
323
- useCssAnimation: !1,
324
- table: { show: !1 },
325
- tooltip: { show: !1 },
326
- style: { chart: {
327
- backgroundColor: "#99999930",
328
- bars: {
329
- totalValues: { show: !1 },
330
- dataLabels: { show: !1 }
331
- },
332
- grid: {
333
- frame: { stroke: "#6A6A6A" },
334
- scale: {
335
- scaleMin: 0,
336
- scaleMax: 40
337
- },
338
- x: {
339
- axisColor: "#6A6A6A",
340
- linesColor: "#6A6A6A",
341
- axisName: { show: !1 },
342
- timeLabels: { show: !1 }
343
- },
344
- y: {
345
- axisColor: "#6A6A6A",
346
- linesColor: "#6A6A6A",
347
- axisName: { show: !1 },
348
- axisLabels: { show: !1 }
349
- }
350
- },
351
- legend: { backgroundColor: "transparent" },
352
- padding: {
353
- left: 24,
354
- right: 24,
355
- bottom: 12
356
- },
357
- zoom: {
358
- show: !1,
359
- startIndex: null,
360
- endIndex: null
361
- }
362
- } }
363
- },
364
- userConfig: B.value.skeletonConfig ?? {}
365
- })), { loading: qn, FINAL_DATASET: Jn, manualLoading: Yn } = ve({
366
- ...Ye(M),
367
- FINAL_CONFIG: B,
368
- prepareConfig: nr,
369
- callback: () => {
370
- Promise.resolve().then(async () => {
371
- (!B.value.style.chart.zoom.keepState || !Ii.value || J.value.start === 0 && J.value.end === 0) && await Li();
372
- });
373
- },
374
- skeletonDataset: M.config?.skeletonDataset ?? [{
375
- name: "",
376
- series: [
377
- 2,
378
- 3,
379
- 5,
380
- 8,
381
- 13,
382
- 21
383
- ],
384
- color: "#BABABA"
385
- }, {
386
- name: "",
387
- series: [
388
- 1,
389
- 2,
390
- 3,
391
- 5,
392
- 8,
393
- 13
394
- ],
395
- color: "#CACACA"
396
- }],
397
- skeletonConfig: fe({
398
- defaultConfig: B.value,
399
- userConfig: Kn.value
400
- })
401
- }), { userOptionsVisible: Xn, setUserOptionsVisibility: Zn, keepUserOptionState: Qn } = Pe({ config: B.value }), { svgRef: $n } = Fe({ config: B.value.style.chart.title });
402
- function er() {
403
- Zn(!0);
404
- }
405
- function tr() {
406
- Zn(!1), N("selectX", {
407
- seriesIndex: null,
408
- datapoint: null
409
- }), L.value = null, z.value = null, fn.value = !1;
410
- }
411
- function nr() {
412
- let e = xe({
413
- userConfig: M.config,
414
- defaultConfig: sn
415
- }), t = {}, n = e.theme;
416
- if (n) if (!cn.value(e)) ln(e), t = e;
417
- else {
418
- let r = xe({
419
- userConfig: Le[n] || M.config,
420
- defaultConfig: e
421
- });
422
- t = {
423
- ...xe({
424
- userConfig: M.config,
425
- defaultConfig: r
426
- }),
427
- customPalette: e.customPalette.length ? e.customPalette : c[n] || d
428
- };
429
- }
430
- else t = e;
431
- return t;
432
- }
433
- let rr = g(() => B.value.style.chart.bars.dataLabels.hideUnderValue != null), ir = g(() => B.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
434
- Ze(() => M.config, (e) => {
435
- qn.value || (B.value = nr()), Xn.value = !B.value.userOptions.showOnChartHover, pr({ resetSlicer: !B.value.style.chart.zoom.keepState }), Sn.value += 1, Cn.value += 1, wn.value += 1, H.value.dataLabels.show = B.value.style.chart.bars.dataLabels.show, H.value.showTable = B.value.table.show, H.value.showTooltip = B.value.style.chart.tooltip.show, Hn(), !B.value.style.chart.zoom.keepState || !Ii.value || J.value.start === 0 && J.value.end === 0 ? Li() : Or();
436
- }, { deep: !0 }), Ze(() => M.dataset, (e) => {
437
- Array.isArray(e) && e.length > 0 && (Yn.value = !1), Hn(), B.value.style.chart.zoom.keepState ? Or() : jr();
438
- }, { deep: !0 });
439
- let H = E({
440
- dataLabels: { show: B.value.style.chart.bars.dataLabels.show },
441
- showTable: B.value.table.show,
442
- showTooltip: B.value.style.chart.tooltip.show
443
- });
444
- Ze(B, () => {
445
- H.value = {
446
- dataLabels: { show: B.value.style.chart.bars.dataLabels.show },
447
- showTable: B.value.table.show,
448
- showTooltip: B.value.style.chart.tooltip.show
449
- };
450
- }, { immediate: !0 });
451
- let { isPrinting: ar, isImaging: or, generatePdf: sr, generateImage: cr } = _e({
452
- elementId: `stackbar_${F.value}`,
453
- fileName: B.value.style.chart.title.text || "vue-ui-stackbar",
454
- options: B.value.userOptions.print
455
- }), U = E({
456
- width: B.value.style.chart.width,
457
- height: B.value.style.chart.height,
458
- paddingRatio: {
459
- top: B.value.style.chart.padding.top / B.value.style.chart.height,
460
- right: B.value.style.chart.padding.right / B.value.style.chart.width,
461
- bottom: B.value.style.chart.padding.bottom / B.value.style.chart.height,
462
- left: B.value.style.chart.padding.left / B.value.style.chart.width
463
- }
464
- }), lr = g(() => le(B.value.customPalette)), W = Je(null), ur = Je(null), dr = E(null), fr = g(() => !!B.value.debug);
465
- function pr({ resetSlicer: e = !0 } = {}) {
466
- if (u(M.dataset) ? (f({
467
- componentName: "VueUiStackbar",
468
- type: "dataset",
469
- debug: fr.value
470
- }), Yn.value = !0) : M.dataset.forEach((e, t) => {
471
- ie({
472
- datasetObject: e,
473
- requiredAttributes: ["name", "series"]
474
- }).forEach((e) => {
475
- dn.value = !1, f({
476
- componentName: "VueUiStackbar",
477
- type: "datasetSerieAttribute",
478
- property: e,
479
- index: t,
480
- debug: fr.value
481
- }), Yn.value = !0;
482
- });
483
- }), u(M.dataset) || (Yn.value = B.value.loading), setTimeout(() => {
484
- xn.value = !0;
485
- }, 10), B.value.responsive) {
486
- let e = ke(() => {
487
- xn.value = !1;
488
- let { width: e, height: t } = Ae({
489
- chart: P.value,
490
- title: B.value.style.chart.title.text ? gn.value : null,
491
- legend: B.value.style.chart.legend.show ? _n.value : null,
492
- slicer: B.value.style.chart.zoom.show && q.value > 6 ? vn.value.$el : null,
493
- source: yn.value
494
- });
495
- requestAnimationFrame(() => {
496
- U.value.width = e, U.value.height = t - 12, clearTimeout(dr.value), dr.value = setTimeout(() => {
497
- xn.value = !0;
498
- }, 10);
499
- });
500
- });
501
- W.value && (ur.value && W.value.unobserve(ur.value), W.value.disconnect()), W.value = new ResizeObserver(e), ur.value = P.value.parentNode, W.value.observe(ur.value);
502
- }
503
- Wn(), e && Li();
504
- }
505
- Ge(() => {
506
- Vn.stop(), W.value && (ur.value && W.value.unobserve(ur.value), W.value.disconnect());
507
- });
508
- function mr() {
509
- let e = 0;
510
- B.value.orientation === "vertical" && Mn.value && (e = Array.from(Mn.value.querySelectorAll("text")).reduce((e, t) => {
511
- let n = t.getComputedTextLength();
512
- return n > e ? n : e;
513
- }, 0)), B.value.orientation === "horizontal" && R.value && (e = Array.from(R.value.querySelectorAll("text")).reduce((e, t) => {
514
- let n = t.getComputedTextLength();
515
- return n > e ? n : e;
516
- }, 0));
517
- let t = jn.value ? jn.value.getBoundingClientRect().width : 0;
518
- return e + t + (t ? 24 : 0);
519
- }
520
- let hr = E(0), gr = E(0), _r = ke((e) => {
521
- gr.value = e + B.value.style.chart.bars.totalValues.fontSize;
522
- }, 100);
523
- function vr() {
524
- if (B.value.orientation !== "horizontal") return 0;
525
- let e = Pn.value;
526
- if (!e) return 0;
527
- let t = Array.from(e.querySelectorAll("text"));
528
- if (!t.length) return 0;
529
- let n = -Infinity;
530
- for (let e of t) try {
531
- let t = e.getBBox(), r = t.x + t.width;
532
- r > n && (n = r);
533
- } catch {}
534
- return Math.max(0, n - (G.value?.right ?? 0));
535
- }
536
- Qe((e) => {
537
- if (B.value.orientation !== "horizontal") return;
538
- let t = Pn.value;
539
- if (!t) return;
540
- let n = () => {
541
- _r(vr());
542
- };
543
- n();
544
- let r = new ResizeObserver(n);
545
- r.observe(t);
546
- let a = new MutationObserver(n);
547
- a.observe(t, {
548
- childList: !0,
549
- subtree: !0,
550
- characterData: !0
551
- }), e(() => {
552
- r.disconnect(), a.disconnect();
553
- });
554
- }), Ge(() => {
555
- hr.value = 0, gr.value = 0;
556
- });
557
- let yr = E(0), br = E(0);
558
- function xr() {
559
- let e = B.value.orientation === "vertical" ? R.value : Mn.value;
560
- if (!e) {
561
- yr.value = 0;
562
- return;
563
- }
564
- try {
565
- let t = e.getBBox();
566
- yr.value = Number.isFinite(t?.height) ? t.height : 0;
567
- } catch {
568
- yr.value = 0;
569
- }
570
- }
571
- function Sr() {
572
- br.value && cancelAnimationFrame(br.value), br.value = requestAnimationFrame(() => {
573
- requestAnimationFrame(() => {
574
- xr();
575
- });
576
- });
577
- }
578
- Ge(() => {
579
- br.value && cancelAnimationFrame(br.value);
580
- });
581
- let Cr = g(() => {
582
- let e = 0;
583
- if (An.value) try {
584
- e = An.value.getBBox().height;
585
- } catch {
586
- e = 0;
587
- }
588
- let t = B.value.style.chart.grid.x.timeLabels.show ? yr.value : 0;
589
- return e + t;
590
- }), G = g(() => {
591
- Ln.value;
592
- let { height: e, width: t } = U.value, { right: n } = U.value.paddingRatio, r = B.value.style.chart.bars.totalValues.show && M.dataset && M.dataset.length > 1 ? B.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, a = 0;
593
- B.value.style.chart.grid.y.axisLabels.show && (a = mr());
594
- let o = B.value.style.chart.padding.top + r, s = t - t * n - gr.value, c = e - B.value.style.chart.padding.bottom - Cr.value - r, l = B.value.style.chart.padding.left + a, u = t - l - t * n - gr.value, d = e - o - B.value.style.chart.padding.bottom - Cr.value - r;
595
- return {
596
- chartHeight: e,
597
- chartWidth: t,
598
- top: o,
599
- right: s,
600
- bottom: c,
601
- left: l,
602
- width: Math.max(0, u),
603
- height: Math.max(0, d)
604
- };
605
- }), wr = g(() => {
606
- let { left: e, top: t, width: n, height: r } = G.value, a = J.value.start, o = J.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (Y.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (Y.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
607
- fill: B.value.style.chart.zoom.preview.fill,
608
- stroke: B.value.style.chart.zoom.preview.stroke,
609
- "stroke-width": B.value.style.chart.zoom.preview.strokeWidth,
610
- "stroke-dasharray": B.value.style.chart.zoom.preview.strokeDasharray,
611
- "stroke-linecap": "round",
612
- "stroke-linejoin": "round",
613
- style: {
614
- pointerEvents: "none",
615
- transition: "none !important",
616
- animation: "none !important"
617
- }
618
- };
619
- if (B.value.orientation === "horizontal") {
620
- let a = r / s;
621
- return {
622
- x: e,
623
- y: t + c * a,
624
- width: n,
625
- height: u * a,
626
- ...d
627
- };
628
- } else {
629
- let a = n / s;
630
- return {
631
- x: e + c * a,
632
- y: t,
633
- width: u * a,
634
- height: r,
635
- ...d
636
- };
637
- }
638
- }), K = g(() => Jn.value.map((e, t) => {
639
- let n = `stackbar_serie_${t}`, r = ue(e.color) || lr.value[t] || d[t] || d[t % d.length];
640
- return {
641
- ...e,
642
- series: JSON.parse(JSON.stringify(e.series)).map((e) => B.value.style.chart.bars.distributed ? Math.abs(e) : e),
643
- signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
644
- absoluteIndex: t,
645
- id: n,
646
- color: r
647
- };
648
- })), q = g(() => {
649
- let e = Math.max(...K.value.filter((e) => !I.value.includes(e.id)).map((e) => e.series.length));
650
- return isFinite(e) ? e : Math.max(...K.value.map((e) => e.series.length));
651
- });
652
- function Tr(e) {
653
- Gn.value = e;
654
- }
655
- let J = E({
656
- start: 0,
657
- end: Math.max(...Jn.value.map((e) => e.series.length))
658
- }), Y = E({
659
- start: 0,
660
- end: Math.max(...Jn.value.map((e) => e.series.length))
661
- }), Er = g(() => B.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
662
- function Dr(e, t) {
663
- Y.value[e] = t;
664
- }
665
- function Or() {
666
- let e = q.value, t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
667
- (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value.start = t, J.value.end = n, Y.value.start = t, Y.value.end = n, vn.value && (vn.value.setStartValue(t), vn.value.setEndValue(n));
668
- }
669
- let kr = E(null);
670
- function Ar() {
671
- return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
672
- }
673
- Ge(() => {
674
- kr.value && cancelAnimationFrame(kr.value);
675
- });
676
- async function jr({ force: e = !1 } = {}) {
677
- if (B.value.style.chart.zoom.keepState && !e && Ii.value && !(J.value.start === 0 && J.value.end === 0)) {
678
- Or();
679
- return;
680
- }
681
- Li(), await Ue(), kr.value && cancelAnimationFrame(kr.value), kr.value = requestAnimationFrame(async () => {
682
- await Ar(), Li();
683
- });
684
- }
685
- let X = g(() => {
686
- let e;
687
- return e = B.value.orientation === "vertical" ? G.value.width / (J.value.end - J.value.start) : G.value.height / (J.value.end - J.value.start), e <= 0 ? 0 : e;
688
- }), Mr = g(() => n(K.value.filter((e) => !I.value.includes(e.id))).slice(J.value.start, J.value.end)), Nr = g(() => I.value.length === K.value.length), Pr = g(() => B.value.style.chart.zoom.minimap.show ? n(K.value.map((e) => ({
689
- ...e,
690
- series: e.series.map((e) => e ?? 0)
691
- })).filter((e) => Nr.value ? !0 : !I.value.includes(e.id))) : []), Fr = g(() => B.value.style.chart.zoom.minimap.show ? [{
692
- name: "",
693
- series: Pr.value,
694
- color: "#000000",
695
- isVisible: !0
696
- }] : []), Ir = g(() => n(K.value.filter((e) => !I.value.includes(e.id)).map((e) => ({
697
- ...e,
698
- series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
699
- }))).slice(J.value.start, J.value.end)), Lr = g(() => {
700
- let e = K.value.filter((e) => !I.value.includes(e.id));
701
- return {
702
- positive: n(e.map((e) => ({
703
- ...e,
704
- series: e.series.slice(J.value.start, J.value.end).map((e) => e >= 0 ? e : 0)
705
- }))),
706
- negative: n(e.map((e) => ({
707
- ...e,
708
- series: e.series.slice(J.value.start, J.value.end).map((e) => e < 0 ? e : 0)
709
- })))
710
- };
711
- }), Z = g(() => {
712
- let e = B.value.style.chart.grid.scale.scaleMax !== null && !B.value.style.chart.bars.distributed ? B.value.style.chart.grid.scale.scaleMax : Math.max(...Lr.value.positive), t = Math.min(...Lr.value.negative), n = B.value.style.chart.grid.scale.scaleMin !== null && !B.value.style.chart.bars.distributed ? B.value.style.chart.grid.scale.scaleMin : [
713
- -Infinity,
714
- Infinity,
715
- NaN,
716
- void 0,
717
- null
718
- ].includes(t) ? 0 : t, r = !B.value.style.chart.bars.distributed && (B.value.style.chart.grid.scale.scaleMax !== null || B.value.style.chart.grid.scale.scaleMin !== null) ? te(n > 0 ? 0 : n, e < 0 ? 0 : e, B.value.style.chart.grid.scale.ticks) : ne(n > 0 ? 0 : n, e < 0 ? 0 : e, B.value.style.chart.grid.scale.ticks);
719
- return r.ticks.map((e) => ({
720
- zero: G.value.bottom - G.value.height * (Math.abs(r.min) / (r.max + Math.abs(r.min))),
721
- y: G.value.bottom - G.value.height * ((e + Math.abs(r.min)) / (r.max + Math.abs(r.min))),
722
- x: G.value.left - 8,
723
- horizontal_zero: G.value.left + G.value.width * (Math.abs(r.min) / (r.max + Math.abs(r.min))),
724
- horizontal_x: G.value.left + G.value.width * ((e + Math.abs(r.min)) / (r.max + Math.abs(r.min))),
725
- horizontal_y: G.value.bottom - 8,
726
- value: e
727
- }));
728
- }), Q = E([]), Rr = E([]), zr = 0;
729
- Qe(() => {
730
- let e = ++zr;
731
- (async () => {
732
- let t = await he({
733
- values: B.value.style.chart.grid.x.timeLabels.values,
734
- maxDatapoints: q.value,
735
- formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
736
- start: J.value.start,
737
- end: J.value.end
738
- });
739
- e === zr && (Q.value = t);
740
- })();
741
- });
742
- let Br = 0;
743
- Qe(() => {
744
- let e = ++Br;
745
- (async () => {
746
- let t = await he({
747
- values: B.value.style.chart.grid.x.timeLabels.values,
748
- maxDatapoints: q.value,
749
- formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
750
- start: 0,
751
- end: q.value
752
- });
753
- e === Br && (Rr.value = t);
754
- })();
755
- });
756
- let Vr = g(() => {
757
- let e = B.value.style.chart.grid.x.timeLabels.modulo;
758
- return Q.value.length ? Math.min(e, [...new Set(Q.value.map((e) => e.text))].length) : e;
759
- }), Hr = g(() => {
760
- let e = B.value.style.chart.grid.x.timeLabels, t = Q.value || [], n = Rr.value || [], r = J.value.start ?? 0, a = L.value, o = q.value, s = t.map((e) => e?.text ?? ""), c = n.map((e) => e?.text ?? "");
761
- return se(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Vr.value || 1), s, c, r, a, o);
762
- });
763
- Qe(() => {
764
- B.value.orientation, B.value.style.chart.grid.x.timeLabels.show, B.value.style.chart.grid.x.timeLabels.fontSize, B.value.style.chart.grid.x.timeLabels.rotation, B.value.style.chart.grid.x.timeLabels.offsetY, Hr.value?.map((e) => e?.text ?? "").join("|"), Z.value?.map((e) => e?.value ?? "").join("|"), U.value.width, U.value.height, R.value, Mn.value, An.value, Sr();
765
- }, { flush: "post" });
766
- let Ur = E({
767
- months: [],
768
- shortMonths: [],
769
- days: [],
770
- shortDays: []
771
- }), Wr = 0;
772
- Qe(() => {
773
- let e = ++Wr, t = B.value.style.chart.grid.x.timeLabels.datetimeFormatter;
774
- (async () => {
775
- let n = await me(t.locale).catch(() => me("en"));
776
- e === Wr && (Ur.value = n.data);
777
- })();
778
- });
779
- let Gr = g(() => {
780
- let e = B.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = pe({
781
- useUTC: e.useUTC,
782
- locale: Ur.value,
783
- januaryAsYear: e.januaryAsYear
784
- });
785
- return (e, n) => {
786
- let r = B.value.style.chart.grid.x.timeLabels.values?.[e];
787
- return r == null ? "" : t.formatDate(new Date(r), n);
788
- };
789
- }), Kr = g(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
790
- text: Gr.value(t, B.value.style.chart.zoom.timeFormat),
791
- absoluteIndex: t
792
- }))), qr = g(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
793
- text: Gr.value(t, B.value.style.chart.tooltip.timeFormat),
794
- absoluteIndex: t
795
- }))), $ = g(() => {
796
- if (!dn.value && !qn.value) return [];
797
- let e = Array(q.value).fill(0), t = Array(q.value).fill(0), n = Array(q.value).fill(0), r = Array(q.value).fill(0), a = Math.max(...Lr.value.positive) || 0, o = Math.min(...Lr.value.negative), s = [
798
- -Infinity,
799
- Infinity,
800
- NaN,
801
- void 0,
802
- null
803
- ].includes(o) ? 0 : o, { min: c, max: l } = !B.value.style.chart.bars.distributed && (B.value.style.chart.grid.scale.scaleMax !== null || B.value.style.chart.grid.scale.scaleMin !== null) ? te(B.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : B.value.style.chart.grid.scale.scaleMin, B.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : B.value.style.chart.grid.scale.scaleMax, B.value.style.chart.grid.scale.ticks) : ne(B.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : B.value.style.chart.grid.scale.scaleMin, B.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : B.value.style.chart.grid.scale.scaleMax, B.value.style.chart.grid.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = G.value.height, ee = G.value.width, f = Z.value[0] ? Z.value[0].zero : G.value.bottom, p = Z.value[0] ? Z.value[0].horizontal_zero : G.value.left, m = Array(Pr.value.length).fill(0), re = Array(Pr.value.length).fill(0);
804
- return K.value.filter((e) => !I.value.includes(e.id)).map((a) => {
805
- let o = a.series.slice(), s = o.map((e, t) => m[t]), c = o.map((e, t) => re[t]);
806
- o.forEach((e, t) => {
807
- (Number(e) || 0) >= 0 ? m[t] += Number(e) || 0 : re[t] += Math.abs(Number(e) || 0);
808
- });
809
- let l = a.series.slice(J.value.start, J.value.end), te = a.signedSeries.slice(J.value.start, J.value.end), ne = l.map((e, t) => G.value.left + X.value * t + X.value * B.value.style.chart.bars.gapRatio / 4), ie = (Pr.value || []).filter(Number.isFinite), ae = ie.length ? Math.max(...ie) : 0, oe = ie.length ? Math.min(...ie) : 0;
810
- function se({ minimapH: e }) {
811
- let t = 1e-9, n = ae > 0;
812
- if (n && oe < 0) {
813
- let n = Math.max(ae, Math.abs(oe)) || t;
814
- return {
815
- pxPerUnit: e / 2 / n,
816
- zero: e / 2
817
- };
818
- }
819
- return n ? {
820
- pxPerUnit: e / Math.max(t, ae),
821
- zero: e
822
- } : {
823
- pxPerUnit: e / Math.max(t, Math.abs(oe)),
824
- zero: 0
825
- };
826
- }
827
- let ce = ({ left: e, unitW: t }) => {
828
- let n = t * (B.value.style.chart.bars.gapRatio / 4);
829
- return o.map((r, a) => e + t * a + n);
830
- }, le = l.map((e, t) => G.value.top + X.value * t + X.value * B.value.style.chart.bars.gapRatio / 4), ue = l.map((t, r) => {
831
- let a = B.value.style.chart.bars.distributed ? (t || 0) / Mr.value[r] : (t || 0) / u, o, s;
832
- return t > 0 ? (s = d * a, o = f - s - e[r], e[r] += s) : (s = d * a, o = f + n[r], n[r] += Math.abs(s)), o;
833
- }), de = ({ minimapH: e }) => {
834
- if (B.value.style.chart.bars.distributed) return o.map((t, n) => {
835
- let r = Math.abs(Number(t) || 0), a = Math.abs(Pr.value?.[n] || 0) || 1e-9;
836
- return e - (s[n] + r) / a * e;
837
- });
838
- let { pxPerUnit: t, zero: n } = se({ minimapH: e });
839
- return o.map((e, r) => {
840
- let a = Number(e) || 0;
841
- return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
842
- });
843
- }, fe = l.map((e, n) => {
844
- let a = B.value.style.chart.bars.distributed ? (e || 0) / Mr.value[n] : (e || 0) / u, o, s;
845
- return e > 0 ? (s = ee * a, o = p + t[n], t[n] += s) : (s = ee * a, o = p - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
846
- }), pe = l.map((e, t) => {
847
- let n = B.value.style.chart.bars.distributed ? (e || 0) / Mr.value[t] : (e || 0) / u;
848
- return e > 0 ? d * n : d * Math.abs(n);
849
- }), me = ({ minimapH: e }) => {
850
- if (B.value.style.chart.bars.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(Pr.value?.[n] || 0) || 1e-9) * e);
851
- let { pxPerUnit: t } = se({ minimapH: e });
852
- return o.map((e) => Math.abs(Number(e) || 0) * t);
853
- }, he = l.map((e, t) => {
854
- let n = B.value.style.chart.bars.distributed ? (e || 0) / Mr.value[t] : (e || 0) / u;
855
- return e > 0 ? ee * n : ee * Math.abs(n);
856
- }), ge = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
857
- return {
858
- ...a,
859
- proportions: l.map((e, t) => B.value.style.chart.bars.distributed ? (e || 0) / Mr.value[t] : (e || 0) / ge),
860
- series: l,
861
- signedSeries: te,
862
- x: ne,
863
- y: ue,
864
- height: pe,
865
- horizontal_width: he,
866
- horizontal_y: le,
867
- horizontal_x: fe,
868
- xMinimap: ce,
869
- yMinimap: de,
870
- heightMinimap: me
871
- };
872
- });
873
- }), Jr = g(() => Ir.value.map((e, t) => ({
874
- value: e,
875
- sign: e >= 0 ? 1 : -1
876
- })));
877
- function Yr(e, t, n, a, o) {
878
- let s = o === -1 && e >= 0 ? -e : e;
879
- return m(B.value.style.chart.bars.dataLabels.formatter, s, r({
880
- p: B.value.style.chart.bars.dataLabels.prefix,
881
- v: s,
882
- s: B.value.style.chart.bars.dataLabels.suffix,
883
- r: B.value.style.chart.bars.dataLabels.rounding
884
- }), {
885
- datapoint: t,
886
- seriesIndex: n,
887
- datapointIndex: a
888
- });
889
- }
890
- function Xr(e, t, n, a) {
891
- return m(B.value.style.chart.bars.dataLabels.formatter, e, r({
892
- v: isNaN(e) ? 0 : e,
893
- s: "%",
894
- r: B.value.style.chart.bars.dataLabels.rounding
895
- }), {
896
- datapoint: t,
897
- seriesIndex: n,
898
- datapointIndex: a
899
- });
900
- }
901
- function Zr(e) {
902
- let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
903
- name: t.name,
904
- value: t.series[e] === 0 ? 0 : t.series[e] || null,
905
- proportion: t.proportions[e] || null,
906
- color: t.color,
907
- id: t.id
908
- }));
909
- B.value.events.datapointClick && B.value.events.datapointClick({
910
- datapoint: t,
911
- seriesIndex: e + J.value.start
912
- }), N("selectDatapoint", {
913
- datapoint: t,
914
- period: Q.value[e]
915
- });
916
- }
917
- function Qr(e) {
918
- return JSON.parse(JSON.stringify($.value)).map((t) => ({
919
- name: t.name,
920
- absoluteIndex: t.absoluteIndex,
921
- value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
922
- proportion: t.proportions[e] || null,
923
- color: t.color,
924
- id: t.id,
925
- timeLabel: Rr.value[e]
926
- }));
927
- }
928
- function $r(e) {
929
- if (B.value.events.datapointLeave) {
930
- let t = Qr(e);
931
- B.value.events.datapointLeave({
932
- datapoint: t,
933
- seriesIndex: e + J.value.start
934
- });
935
- }
936
- fn.value = !1, L.value = null, z.value === e && (z.value = null);
937
- }
938
- let ei = g(() => Array(q.value).fill(0).map((e, t) => Qr(t)));
939
- Ze(() => M.selectedXIndex, (e) => {
940
- if ([null, void 0].includes(M.selectedXIndex)) {
941
- L.value = null;
942
- return;
943
- }
944
- let t = e - J.value.start;
945
- t < 0 || e >= J.value.end ? L.value = null : L.value = t ?? null;
946
- }, { immediate: !0 });
947
- function ti(e) {
948
- if (!B.value.style.chart.tooltip.showTimeLabel) return null;
949
- let t = Q.value?.[e]?.text || null, n = qr.value?.[e]?.text || null, r = Rr.value?.[e]?.text || null;
950
- return B.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
951
- }
952
- function ni(e, t = "pointer") {
953
- if (Nr.value) return;
954
- Bn.value = t, z.value = e, L.value = e, fn.value = !0;
955
- let n = B.value.style.chart.tooltip.customFormat, a = Qr(e);
956
- Vi({
957
- seriesIndex: e,
958
- datapoint: a
959
- }), B.value.events.datapointEnter && B.value.events.datapointEnter({
960
- datapoint: a,
961
- seriesIndex: e + J.value.start
962
- }), pn.value = {
963
- timeLabel: ti(e),
964
- datapoint: a,
965
- seriesIndex: e,
966
- config: B.value,
967
- series: $.value
968
- };
969
- let o = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), s = a.map((e) => p(e.value)).reduce((e, t) => e + t, 0);
970
- if (ae(n) && re(() => n({
971
- seriesIndex: e,
972
- datapoint: a,
973
- series: $.value,
974
- config: B.value
975
- }))) mn.value = n({
976
- seriesIndex: e,
977
- datapoint: a,
978
- series: $.value,
979
- config: B.value
980
- });
981
- else {
982
- let { showValue: t, showTotal: n, totalTranslation: c, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: ee } = B.value.style.chart.tooltip, f = "", p = ti(e);
983
- p && (f += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${p}</div>`), n && (f += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
984
- <span>${c}:</span>
985
- <span>
986
- ${m(B.value.style.chart.bars.dataLabels.formatter, s, r({
987
- p: B.value.style.chart.bars.dataLabels.prefix,
988
- v: s,
989
- s: B.value.style.chart.bars.dataLabels.suffix,
990
- r: d
991
- }), { datapoint: {
992
- name: c,
993
- value: s
994
- } })}
995
- </span>
996
- </div>`);
997
- let te = [t && l ? "(" : "", t && l ? ")" : ""];
998
- a.reverse().forEach((e) => {
999
- f += `
1000
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1001
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${un.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${F.value}_${e.absoluteIndex})"/>` : ""}</svg>
1002
- ${e.name}${t || l ? ":" : ""} ${t ? m(B.value.style.chart.bars.dataLabels.formatter, e.value, r({
1003
- p: B.value.style.chart.bars.dataLabels.prefix,
1004
- v: e.value,
1005
- s: B.value.style.chart.bars.dataLabels.suffix,
1006
- r: d
1007
- }, { datapoint: e })) : ""} ${te[0]}${l ? r({
1008
- v: isNaN(e.value / o) ? 0 : Math.abs(e.value) / o * 100,
1009
- s: "%",
1010
- r: ee
1011
- }) : ""}${te[1]}
1012
- </div>
1013
- `;
1014
- }), mn.value = `<div>${f}</div>`;
1015
- }
1016
- }
1017
- let ri = g(() => U.value.width), ii = g(() => U.value.height);
1018
- we({
1019
- timeLabelsEls: B.value.orientation === "vertical" ? R : Mn,
1020
- timeLabels: Q,
1021
- slicer: J,
1022
- configRef: B,
1023
- rotationPath: [
1024
- "style",
1025
- "chart",
1026
- "grid",
1027
- "x",
1028
- "timeLabels",
1029
- "rotation"
1030
- ],
1031
- autoRotatePath: [
1032
- "style",
1033
- "chart",
1034
- "grid",
1035
- "x",
1036
- "timeLabels",
1037
- "autoRotate",
1038
- "enable"
1039
- ],
1040
- isAutoSize: !1,
1041
- width: ri,
1042
- height: ii,
1043
- rotation: B.value.style.chart.grid.x.timeLabels.autoRotate.angle
1044
- });
1045
- function ai(e) {
1046
- bn.value = e, hn.value += 1;
1047
- }
1048
- function oi() {
1049
- H.value.showTable = !H.value.showTable;
1050
- }
1051
- function si() {
1052
- H.value.dataLabels.show = !H.value.dataLabels.show;
1053
- }
1054
- function ci() {
1055
- H.value.showTooltip = !H.value.showTooltip;
1056
- }
1057
- function li() {
1058
- return $.value;
1059
- }
1060
- let ui = g(() => {
1061
- if ($.value.length === 0) return {
1062
- head: [],
1063
- body: [],
1064
- config: {},
1065
- columnNames: []
1066
- };
1067
- let e = $.value.map(({ name: e, color: t }) => ({
1068
- label: e,
1069
- color: t
1070
- })), t = [];
1071
- return Q.value.forEach((e) => {
1072
- let n = [B.value.style.chart.grid.x.timeLabels.values[e.absoluteIndex] ? e.text : i + 1];
1073
- K.value.forEach((t) => {
1074
- n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(B.value.table.td.roundingValue)));
1075
- }), t.push(n);
1076
- }), {
1077
- head: e,
1078
- body: t
1079
- };
1080
- });
1081
- function di(e = null) {
1082
- let t = [
1083
- [B.value.style.chart.title.text],
1084
- [B.value.style.chart.title.subtitle.text],
1085
- [""]
1086
- ], n = ["", ...ui.value.head.map((e) => e.label)], r = ui.value.body, a = l(t.concat([n]).concat(r));
1087
- e ? e(a) : s({
1088
- csvContent: a,
1089
- title: B.value.style.chart.title.text || "vue-ui-stackbar"
1090
- });
1091
- }
1092
- let fi = g(() => {
1093
- let e = [""].concat($.value.map((e) => e.name), " <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>"), t = [], n = J.value.end - J.value.start;
1094
- for (let e = 0; e < n; e += 1) {
1095
- let n = J.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1096
- t.push([B.value.style.chart.grid.x.timeLabels.values[n] && Q.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(B.value.table.td.roundingValue)), (r ?? 0).toFixed(B.value.table.td.roundingValue)));
1097
- }
1098
- let r = {
1099
- th: {
1100
- backgroundColor: B.value.table.th.backgroundColor,
1101
- color: B.value.table.th.color,
1102
- outline: B.value.table.th.outline
1103
- },
1104
- td: {
1105
- backgroundColor: B.value.table.td.backgroundColor,
1106
- color: B.value.table.td.color,
1107
- outline: B.value.table.td.outline
1108
- },
1109
- breakpoint: B.value.table.responsiveBreakpoint
1110
- }, a = [B.value.table.columnNames.period].concat($.value.map((e) => e.name), B.value.table.columnNames.total);
1111
- return {
1112
- head: e,
1113
- body: t.slice(0, J.value.end - J.value.start),
1114
- config: r,
1115
- colNames: a
1116
- };
1117
- });
1118
- function pi() {
1119
- I.value.length ? I.value = [] : vi.value.forEach((e) => {
1120
- I.value.push(e.id);
1121
- });
1122
- }
1123
- function mi(e) {
1124
- if (I.value.includes(e.id)) I.value = I.value.filter((t) => t !== e.id);
1125
- else {
1126
- if (I.value.length === K.value.length - 1) return;
1127
- I.value.push(e.id);
1128
- }
1129
- N("selectLegend", $.value);
1130
- }
1131
- function hi(e) {
1132
- return K.value.length ? K.value.find((t) => t.name === e) || (B.value.debug && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (B.value.debug && console.warn("VueUiStackbar - There are no series to show."), null);
1133
- }
1134
- function gi(e) {
1135
- let t = hi(e);
1136
- t !== null && I.value.includes(t.id) && mi({ id: t.id });
1137
- }
1138
- function _i(e) {
1139
- let t = hi(e);
1140
- t !== null && (I.value.includes(t.id) || mi({ id: t.id }));
1141
- }
1142
- let vi = g(() => K.value.map((e, t) => ({
1143
- ...e,
1144
- shape: "square"
1145
- })).map((e) => ({
1146
- ...e,
1147
- opacity: I.value.includes(e.id) ? .5 : 1,
1148
- segregate: () => mi(e),
1149
- isSegregated: I.value.includes(e.id)
1150
- }))), yi = g(() => ({
1151
- cy: "stackbar-legend",
1152
- backgroundColor: B.value.style.chart.legend.backgroundColor,
1153
- color: B.value.style.chart.legend.color,
1154
- fontSize: B.value.style.chart.legend.fontSize,
1155
- paddingBottom: 12,
1156
- fontWeight: B.value.style.chart.legend.bold ? "bold" : ""
1157
- })), bi = E(!1);
1158
- function xi() {
1159
- bi.value = !bi.value;
1160
- }
1161
- function Si(e, t) {
1162
- N("selectTimeLabel", {
1163
- datapoint: JSON.parse(JSON.stringify($.value)).map((e) => ({
1164
- name: e.name,
1165
- value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1166
- proportion: e.proportions[t] || null,
1167
- color: e.color,
1168
- id: e.id
1169
- })),
1170
- absoluteIndex: e.absoluteIndex,
1171
- label: e.text
1172
- });
1173
- }
1174
- let Ci = g(() => Math.max(...$.value.flatMap((e) => e.series)));
1175
- function wi(e, t) {
1176
- return B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? ir.value ? t * 100 >= B.value.style.chart.bars.dataLabels.hideUnderPercentage : B.value.style.chart.bars.dataLabels.hideEmptyPercentages ? t > 0 : !0 : ir.value ? (rr.value && fr.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > Ci.value * B.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : rr.value ? Math.abs(e) >= B.value.style.chart.bars.dataLabels.hideUnderValue : B.value.style.chart.bars.dataLabels.hideEmptyValues ? e !== 0 : !0;
1177
- }
1178
- async function Ti({ scale: e = 2 } = {}) {
1179
- if (!P.value) return;
1180
- let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: a, base64: o } = await Te({
1181
- domElement: P.value,
1182
- base64: !0,
1183
- img: !0,
1184
- scale: e
1185
- });
1186
- return {
1187
- imageUri: a,
1188
- base64: o,
1189
- title: B.value.style.chart.title.text,
1190
- width: t,
1191
- height: n,
1192
- aspectRatio: r
1193
- };
1194
- }
1195
- let Ei = g(() => {
1196
- let e = B.value.table.useDialog && !B.value.table.show, t = H.value.showTable;
1197
- return {
1198
- component: e ? on : en,
1199
- title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
1200
- props: e ? {
1201
- backgroundColor: B.value.table.th.backgroundColor,
1202
- color: B.value.table.th.color,
1203
- headerColor: B.value.table.th.color,
1204
- headerBg: B.value.table.th.backgroundColor,
1205
- isFullscreen: bn.value,
1206
- fullscreenParent: P.value,
1207
- forcedWidth: Math.min(800, window.innerWidth * .8),
1208
- isCursorPointer: V.value
1209
- } : {
1210
- hideDetails: !0,
1211
- config: {
1212
- open: t,
1213
- maxHeight: 1e4,
1214
- body: {
1215
- backgroundColor: B.value.style.chart.backgroundColor,
1216
- color: B.value.style.chart.color
1217
- },
1218
- head: {
1219
- backgroundColor: B.value.style.chart.backgroundColor,
1220
- color: B.value.style.chart.color
1221
- }
1222
- }
1223
- }
1224
- };
1225
- });
1226
- Ze(() => H.value.showTable, (e) => {
1227
- B.value.table.show || (e && B.value.table.useDialog && En.value ? En.value.open() : "close" in En.value && En.value.close());
1228
- });
1229
- function Di() {
1230
- H.value.showTable = !1, Dn.value && Dn.value.setTableIconState(!1);
1231
- }
1232
- let Oi = g(() => B.value.style.chart.backgroundColor), ki = g(() => B.value.style.chart.legend), { exportSvg: Ai, getSvg: ji } = be({
1233
- svg: $n,
1234
- title: g(() => B.value.style.chart.title),
1235
- legend: ki,
1236
- legendItems: vi,
1237
- backgroundColor: Oi
1238
- });
1239
- async function Mi({ isCb: e }) {
1240
- kn.value = !0, await Ue();
1241
- try {
1242
- if (e) {
1243
- let { blob: e, url: t, text: n, dataUrl: r } = await ji();
1244
- await Promise.resolve(B.value.userOptions.callbacks.svg({
1245
- blob: e,
1246
- url: t,
1247
- text: n,
1248
- dataUrl: r
1249
- }));
1250
- } else await Promise.resolve(Ai());
1251
- } finally {
1252
- kn.value = !1;
1253
- }
1254
- }
1255
- function Ni(e) {
1256
- if (e?.stage === "start") {
1257
- On.value = !0;
1258
- return;
1259
- }
1260
- if (e?.stage === "end") {
1261
- On.value = !1;
1262
- return;
1263
- }
1264
- cr();
1265
- }
1266
- function Pi(e) {
1267
- let t = q.value;
1268
- return e > t ? t : e < 0 || e < J.value.start ? B.value.style.chart.zoom.startIndex === null ? 1 : J.value.start + 1 : e;
1269
- }
1270
- let Fi = E(!1), Ii = E(!1);
1271
- function Li() {
1272
- if (!Fi.value) {
1273
- Fi.value = !0;
1274
- try {
1275
- let { startIndex: e, endIndex: t, keepState: n } = B.value.style.chart.zoom, r = n ? Math.max(0, q.value) : q.value;
1276
- if (n && r <= 0) return;
1277
- let a = e ?? 0, o = t == null ? r : Math.min(Pi(t + 1), r);
1278
- Ri.value = !0, J.value.start = a, J.value.end = o, Y.value.start = a, Y.value.end = o, Or(), Ii.value = !0;
1279
- } finally {
1280
- queueMicrotask(() => {
1281
- Ri.value = !1;
1282
- }), Fi.value = !1;
1283
- }
1284
- }
1285
- }
1286
- let Ri = E(!1);
1287
- function zi(e) {
1288
- Fi.value || Ri.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Or());
1289
- }
1290
- function Bi(e) {
1291
- if (Fi.value || Ri.value) return;
1292
- let t = Pi(e);
1293
- t !== J.value.end && (J.value.end = t, Y.value.end = t, Or());
1294
- }
1295
- function Vi({ seriesIndex: e, datapoint: t }) {
1296
- let n = J.value.start + e;
1297
- N("selectX", {
1298
- dataset: t,
1299
- index: n,
1300
- indexLabel: B.value.style.chart.grid.x.timeLabels.values[n]
1301
- });
1302
- }
1303
- function Hi() {
1304
- return { y0: Z.value?.[0]?.zero ?? G.value.bottom };
1305
- }
1306
- function Ui(e) {
1307
- let { y0: t } = Hi(), n = B.value.style.chart.bars.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
1308
- for (let t of $.value || []) {
1309
- let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
1310
- n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
1311
- }
1312
- let s = (o && Number.isFinite(a) ? a : t) - r;
1313
- return Math.min(Math.max(s, 0), G.value.bottom);
1314
- }
1315
- function Wi(e) {
1316
- let { x0: t } = Hi(), n = Math.max(2, B.value.style.chart.bars.totalValues.fontSize * .3 + B.value.style.chart.bars.totalValues.offsetX), r = -Infinity, a = !1;
1317
- for (let t of $.value || []) {
1318
- let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
1319
- Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
1320
- }
1321
- return (a && Number.isFinite(r) ? r : t) + n;
1322
- }
1323
- async function Gi() {
1324
- if (N("copyAlt", {
1325
- config: B.value,
1326
- dataset: $.value
1327
- }), !B.value.userOptions.callbacks.altCopy) {
1328
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1329
- return;
1330
- }
1331
- await Promise.resolve(B.value.userOptions.callbacks.altCopy({
1332
- config: B.value,
1333
- dataset: $.value
1334
- }));
1335
- }
1336
- let Ki = E(!1);
1337
- function qi() {
1338
- z.value = null, Ki.value = !0;
1339
- }
1340
- function Ji() {
1341
- z.value = null, fn.value = !1, L.value = null, N("selectX", {
1342
- seriesIndex: null,
1343
- datapoint: null
1344
- }), Ki.value = !1;
1345
- }
1346
- function Yi(e) {
1347
- if (!$n.value || bi.value || document.activeElement !== $n.value || Nr.value || !J.value.end && J.value.end !== 0) return;
1348
- let t = B.value.orientation === "vertical", n = B.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
1349
- if (!r && !a && !o && !s) return;
1350
- let c = J.value.end - J.value.start;
1351
- if (c <= 0) return;
1352
- if (e.preventDefault(), e.stopPropagation(), s) {
1353
- z.value = null, fn.value = !1, L.value = null, N("selectX", {
1354
- seriesIndex: null,
1355
- datapoint: null
1356
- });
1357
- return;
1358
- }
1359
- if (o) {
1360
- if (z.value === null) return;
1361
- Zr(z.value);
1362
- return;
1363
- }
1364
- let l = z.value, u = L.value;
1365
- l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, z.value = l, Xi(l), ni(l, "keyboard");
1366
- }
1367
- function Xi(e) {
1368
- if (!Number.isFinite(e)) return;
1369
- let t, n;
1370
- B.value.orientation === "vertical" ? (t = G.value.left + e * X.value + X.value / 2, n = G.value.top + G.value.height / 2) : (t = G.value.left + G.value.width / 2, n = G.value.top + e * X.value + X.value / 2);
1371
- let r = o(t, n, $n.value);
1372
- r && (zn.value = r);
1373
- }
1374
- let Zi = g(() => ({
1375
- headers: fi.value?.colNames ?? [],
1376
- rows: fi.value?.body ?? []
1377
- }));
1378
- return Oe({
1379
- getData: li,
1380
- getImage: Ti,
1381
- generatePdf: sr,
1382
- generateCsv: di,
1383
- generateImage: cr,
1384
- generateSvg: Mi,
1385
- hideSeries: _i,
1386
- showSeries: gi,
1387
- toggleTable: oi,
1388
- toggleLabels: si,
1389
- toggleTooltip: ci,
1390
- toggleAnnotator: xi,
1391
- toggleFullscreen: ai,
1392
- copyAlt: Gi
1393
- }), (n, a) => (T(), y("div", {
1394
- id: `stackbar_${F.value}`,
1395
- ref_key: "stackbarChart",
1396
- ref: P,
1397
- class: We({
1398
- "vue-data-ui-component": !0,
1399
- "vue-ui-stackbar": !0,
1400
- "vue-data-ui-wrapper-fullscreen": bn.value
1401
- }),
1402
- style: w(`background:${B.value.style.chart.backgroundColor};color:${B.value.style.chart.color};font-family:${B.value.style.fontFamily}; position: relative; ${B.value.responsive ? "height: 100%" : ""}`),
1403
- onMouseenter: er,
1404
- onMouseleave: tr
1405
- }, [
1406
- b("div", {
1407
- id: `chart-instructions-${F.value}`,
1408
- class: "sr-only"
1409
- }, [b("p", null, k(B.value.a11y.translations.keyboardNavigation), 1)], 8, tt),
1410
- Zi.value?.rows?.length ? (T(), _(Ne, {
1411
- key: 0,
1412
- uid: F.value,
1413
- head: Zi.value.headers,
1414
- body: Zi.value.rows,
1415
- notice: B.value.a11y.translations.tableAvailable,
1416
- caption: B.value.a11y.translations.tableCaption
1417
- }, null, 8, [
1418
- "uid",
1419
- "head",
1420
- "body",
1421
- "notice",
1422
- "caption"
1423
- ])) : v("", !0),
1424
- B.value.userOptions.buttons.annotator ? (T(), _(A(nn), {
1425
- key: 1,
1426
- svgRef: A($n),
1427
- backgroundColor: B.value.style.chart.backgroundColor,
1428
- color: B.value.style.chart.color,
1429
- active: bi.value,
1430
- isCursorPointer: V.value,
1431
- onClose: xi
1432
- }, {
1433
- "annotator-action-close": j(() => [O(n.$slots, "annotator-action-close", {}, void 0, !0)]),
1434
- "annotator-action-color": j(({ color: e }) => [O(n.$slots, "annotator-action-color", C(S({ color: e })), void 0, !0)]),
1435
- "annotator-action-draw": j(({ mode: e }) => [O(n.$slots, "annotator-action-draw", C(S({ mode: e })), void 0, !0)]),
1436
- "annotator-action-undo": j(({ disabled: e }) => [O(n.$slots, "annotator-action-undo", C(S({ disabled: e })), void 0, !0)]),
1437
- "annotator-action-redo": j(({ disabled: e }) => [O(n.$slots, "annotator-action-redo", C(S({ disabled: e })), void 0, !0)]),
1438
- "annotator-action-delete": j(({ disabled: e }) => [O(n.$slots, "annotator-action-delete", C(S({ disabled: e })), void 0, !0)]),
1439
- _: 3
1440
- }, 8, [
1441
- "svgRef",
1442
- "backgroundColor",
1443
- "color",
1444
- "active",
1445
- "isCursorPointer"
1446
- ])) : v("", !0),
1447
- O(n.$slots, "userConfig", {}, void 0, !0),
1448
- B.value.style.chart.title.text ? (T(), y("div", {
1449
- key: 2,
1450
- ref_key: "chartTitle",
1451
- ref: gn,
1452
- style: "width:100%;background:transparent;padding-bottom:24px"
1453
- }, [(T(), _(Ee, {
1454
- key: `title_${Sn.value}`,
1455
- config: {
1456
- title: {
1457
- cy: "stackbar-title",
1458
- ...B.value.style.chart.title
1459
- },
1460
- subtitle: {
1461
- cy: "stackbar-subtitle",
1462
- ...B.value.style.chart.title.subtitle
1463
- }
1464
- }
1465
- }, null, 8, ["config"]))], 512)) : v("", !0),
1466
- b("div", { id: `legend-top-${F.value}` }, null, 8, nt),
1467
- B.value.userOptions.show && dn.value && (A(Qn) || A(Xn)) ? (T(), _(A(rn), {
1468
- ref_key: "userOptionsRef",
1469
- ref: Dn,
1470
- key: `user_option_${hn.value}`,
1471
- backgroundColor: B.value.style.chart.backgroundColor,
1472
- color: B.value.style.chart.color,
1473
- isPrinting: A(ar),
1474
- isImaging: A(or),
1475
- uid: F.value,
1476
- hasTooltip: B.value.style.chart.tooltip.show && B.value.userOptions.buttons.tooltip,
1477
- hasPdf: B.value.userOptions.buttons.pdf,
1478
- hasImg: B.value.userOptions.buttons.img,
1479
- hasSvg: B.value.userOptions.buttons.svg,
1480
- hasXls: B.value.userOptions.buttons.csv,
1481
- hasTable: B.value.userOptions.buttons.table,
1482
- hasLabel: B.value.userOptions.buttons.labels,
1483
- hasFullscreen: B.value.userOptions.buttons.fullscreen,
1484
- hasAltCopy: B.value.userOptions.buttons.altCopy,
1485
- isFullscreen: bn.value,
1486
- chartElement: P.value,
1487
- position: B.value.userOptions.position,
1488
- isTooltip: H.value.showTooltip,
1489
- titles: { ...B.value.userOptions.buttonTitles },
1490
- hasAnnotator: B.value.userOptions.buttons.annotator,
1491
- isAnnotation: bi.value,
1492
- callbacks: B.value.userOptions.callbacks,
1493
- printScale: B.value.userOptions.print.scale,
1494
- tableDialog: B.value.table.useDialog,
1495
- isCursorPointer: V.value,
1496
- onToggleFullscreen: ai,
1497
- onGeneratePdf: A(sr),
1498
- onGenerateCsv: di,
1499
- onGenerateImage: Ni,
1500
- onGenerateSvg: Mi,
1501
- onToggleTable: oi,
1502
- onToggleLabels: si,
1503
- onToggleTooltip: ci,
1504
- onToggleAnnotator: xi,
1505
- onCopyAlt: Gi,
1506
- style: w({ visibility: A(Qn) ? A(Xn) ? "visible" : "hidden" : "visible" })
1507
- }, ze({ _: 2 }, [
1508
- n.$slots.menuIcon ? {
1509
- name: "menuIcon",
1510
- fn: j(({ isOpen: e, color: t }) => [O(n.$slots, "menuIcon", C(S({
1511
- isOpen: e,
1512
- color: t
1513
- })), void 0, !0)]),
1514
- key: "0"
1515
- } : void 0,
1516
- n.$slots.optionTooltip ? {
1517
- name: "optionTooltip",
1518
- fn: j(() => [O(n.$slots, "optionTooltip", {}, void 0, !0)]),
1519
- key: "1"
1520
- } : void 0,
1521
- n.$slots.optionPdf ? {
1522
- name: "optionPdf",
1523
- fn: j(() => [O(n.$slots, "optionPdf", {}, void 0, !0)]),
1524
- key: "2"
1525
- } : void 0,
1526
- n.$slots.optionCsv ? {
1527
- name: "optionCsv",
1528
- fn: j(() => [O(n.$slots, "optionCsv", {}, void 0, !0)]),
1529
- key: "3"
1530
- } : void 0,
1531
- n.$slots.optionImg ? {
1532
- name: "optionImg",
1533
- fn: j(() => [O(n.$slots, "optionImg", {}, void 0, !0)]),
1534
- key: "4"
1535
- } : void 0,
1536
- n.$slots.optionSvg ? {
1537
- name: "optionSvg",
1538
- fn: j(() => [O(n.$slots, "optionSvg", {}, void 0, !0)]),
1539
- key: "5"
1540
- } : void 0,
1541
- n.$slots.optionTable ? {
1542
- name: "optionTable",
1543
- fn: j(() => [O(n.$slots, "optionTable", {}, void 0, !0)]),
1544
- key: "6"
1545
- } : void 0,
1546
- n.$slots.optionLabels ? {
1547
- name: "optionLabels",
1548
- fn: j(() => [O(n.$slots, "optionLabels", {}, void 0, !0)]),
1549
- key: "7"
1550
- } : void 0,
1551
- n.$slots.optionFullscreen ? {
1552
- name: "optionFullscreen",
1553
- fn: j(({ toggleFullscreen: e, isFullscreen: t }) => [O(n.$slots, "optionFullscreen", C(S({
1554
- toggleFullscreen: e,
1555
- isFullscreen: t
1556
- })), void 0, !0)]),
1557
- key: "8"
1558
- } : void 0,
1559
- n.$slots.optionAnnotator ? {
1560
- name: "optionAnnotator",
1561
- fn: j(({ toggleAnnotator: e, isAnnotator: t }) => [O(n.$slots, "optionAnnotator", C(S({
1562
- toggleAnnotator: e,
1563
- isAnnotator: t
1564
- })), void 0, !0)]),
1565
- key: "9"
1566
- } : void 0,
1567
- n.$slots.optionAltCopy ? {
1568
- name: "optionAltCopy",
1569
- fn: j(({ altCopy: e }) => [O(n.$slots, "optionAltCopy", C(S({ altCopy: e })), void 0, !0)]),
1570
- key: "10"
1571
- } : void 0,
1572
- n.$slots["custom-menu-before"] ? {
1573
- name: "custom-menu-before",
1574
- fn: j(() => [O(n.$slots, "custom-menu-before", {}, void 0, !0)]),
1575
- key: "11"
1576
- } : void 0,
1577
- n.$slots["custom-menu-after"] ? {
1578
- name: "custom-menu-after",
1579
- fn: j(() => [O(n.$slots, "custom-menu-after", {}, void 0, !0)]),
1580
- key: "12"
1581
- } : void 0
1582
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : v("", !0),
1583
- b("div", rt, [(T(), y("svg", {
1584
- ref_key: "svgRef",
1585
- ref: $n,
1586
- xmlns: A(ce),
1587
- "aria-describedby": `chart-instructions-${F.value}`,
1588
- viewBox: `0 0 ${G.value.chartWidth <= 0 ? 10 : G.value.chartWidth} ${G.value.chartHeight <= 0 ? 10 : G.value.chartHeight}`,
1589
- class: We({ "vue-data-ui-loading": A(qn) }),
1590
- style: w(`max-width:100%;overflow:visible;background:transparent;color:${B.value.style.chart.color}`),
1591
- tabindex: "0",
1592
- onFocus: qi,
1593
- onBlur: Ji,
1594
- onKeydown: Yi
1595
- }, [
1596
- Ve(A(an)),
1597
- n.$slots["chart-background"] ? (T(), y("foreignObject", {
1598
- key: 0,
1599
- x: G.value.left,
1600
- y: G.value.top,
1601
- width: G.value.width <= 0 ? 10 : G.value.width,
1602
- height: G.value.height <= 0 ? 10 : G.value.height,
1603
- style: { pointerEvents: "none" }
1604
- }, [O(n.$slots, "chart-background", {}, void 0, !0)], 8, at)) : v("", !0),
1605
- B.value.style.chart.bars.gradient.show ? (T(), y("defs", ot, [(T(!0), y(h, null, D($.value, (e, t) => (T(), y("linearGradient", {
1606
- id: `gradient_${e.id}`,
1607
- x1: "0%",
1608
- y1: "0%",
1609
- x2: "0%",
1610
- y2: "100%"
1611
- }, [
1612
- b("stop", {
1613
- offset: "0%",
1614
- "stop-color": e.color
1615
- }, null, 8, ct),
1616
- b("stop", {
1617
- offset: "61.8%",
1618
- "stop-color": A(de)(e.color, B.value.style.chart.bars.gradient.intensity / 100)
1619
- }, null, 8, lt),
1620
- b("stop", {
1621
- offset: "100%",
1622
- "stop-color": e.color
1623
- }, null, 8, ut)
1624
- ], 8, st))), 256))])) : v("", !0),
1625
- B.value.style.chart.grid.frame.show ? (T(), y("rect", {
1626
- key: 2,
1627
- style: {
1628
- pointerEvents: "none",
1629
- transition: "none",
1630
- animation: "none !important"
1631
- },
1632
- x: Math.max(0, G.value.left),
1633
- y: Math.max(0, G.value.top),
1634
- width: Math.max(0, G.value.width),
1635
- height: Math.max(0, G.value.height),
1636
- fill: "transparent",
1637
- stroke: B.value.style.chart.grid.frame.stroke,
1638
- "stroke-width": B.value.style.chart.grid.frame.strokeWidth,
1639
- "stroke-linecap": B.value.style.chart.grid.frame.strokeLinecap,
1640
- "stroke-linejoin": B.value.style.chart.grid.frame.strokeLinejoin,
1641
- "stroke-dasharray": B.value.style.chart.grid.frame.strokeDasharray
1642
- }, null, 8, dt)) : v("", !0),
1643
- B.value.style.chart.grid.x.showHorizontalLines && B.value.orientation === "vertical" ? (T(!0), y(h, { key: 3 }, D(Z.value, (e, t) => (T(), y("line", {
1644
- x1: G.value.left,
1645
- x2: G.value.right,
1646
- y1: e.y,
1647
- y2: e.y,
1648
- stroke: B.value.style.chart.grid.x.linesColor,
1649
- "stroke-width": B.value.style.chart.grid.x.linesThickness,
1650
- "stroke-dasharray": B.value.style.chart.grid.x.linesStrokeDasharray,
1651
- "stroke-linecap": "round"
1652
- }, null, 8, ft))), 256)) : v("", !0),
1653
- B.value.style.chart.grid.x.showHorizontalLines && B.value.orientation === "horizontal" ? (T(!0), y(h, { key: 4 }, D(J.value.end - J.value.start + 1, (e, t) => (T(), y("line", {
1654
- x1: G.value.left,
1655
- x2: G.value.right,
1656
- y1: G.value.top + X.value * t,
1657
- y2: G.value.top + X.value * t,
1658
- stroke: B.value.style.chart.grid.x.linesColor,
1659
- "stroke-width": B.value.style.chart.grid.x.linesThickness,
1660
- "stroke-dasharray": B.value.style.chart.grid.x.linesStrokeDasharray,
1661
- "stroke-linecap": "round"
1662
- }, null, 8, pt))), 256)) : v("", !0),
1663
- B.value.style.chart.grid.y.showVerticalLines && B.value.orientation === "vertical" ? (T(!0), y(h, { key: 5 }, D(J.value.end - J.value.start + 1, (e, t) => (T(), y("line", {
1664
- x1: G.value.left + X.value * t,
1665
- x2: G.value.left + X.value * t,
1666
- y1: G.value.top,
1667
- y2: G.value.bottom,
1668
- stroke: B.value.style.chart.grid.y.linesColor,
1669
- "stroke-width": B.value.style.chart.grid.y.linesThickness,
1670
- "stroke-dasharray": B.value.style.chart.grid.y.linesStrokeDasharray,
1671
- "stroke-linecap": "round"
1672
- }, null, 8, mt))), 256)) : v("", !0),
1673
- B.value.style.chart.grid.y.showVerticalLines && B.value.orientation === "horizontal" ? (T(!0), y(h, { key: 6 }, D(Z.value, (e, t) => (T(), y("line", {
1674
- x1: e.horizontal_x,
1675
- x2: e.horizontal_x,
1676
- y1: G.value.top,
1677
- y2: G.value.bottom,
1678
- stroke: B.value.style.chart.grid.y.linesColor,
1679
- "stroke-width": B.value.style.chart.grid.y.linesThickness,
1680
- "stroke-dasharray": B.value.style.chart.grid.y.linesStrokeDasharray,
1681
- "stroke-linecap": "round"
1682
- }, null, 8, ht))), 256)) : v("", !0),
1683
- (T(!0), y(h, null, D($.value, (e, t) => (T(), y("g", null, [n.$slots.pattern ? (T(), y("defs", gt, [O(n.$slots, "pattern", He({ ref_for: !0 }, {
1684
- seriesIndex: e.absoluteIndex,
1685
- patternId: `pattern_${F.value}_${e.absoluteIndex}`
1686
- }), void 0, !0)])) : v("", !0), B.value.orientation === "vertical" ? (T(), y(h, { key: 1 }, [(T(!0), y(h, null, D(e.x, (t, n) => (T(), y("rect", {
1687
- x: t,
1688
- y: A(p)(e.y[n]),
1689
- height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1690
- rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1691
- width: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1692
- fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
1693
- stroke: B.value.style.chart.backgroundColor,
1694
- "stroke-width": B.value.style.chart.bars.strokeWidth,
1695
- "stroke-linecap": "round",
1696
- "stroke-linejoin": "round",
1697
- class: We({
1698
- "vue-data-ui-bar-animated": B.value.useCssAnimation,
1699
- "vue-data-ui-bar-transition": xn.value
1700
- })
1701
- }, null, 10, _t))), 256)), n.$slots.pattern ? (T(), y("g", vt, [(T(!0), y(h, null, D(e.x, (t, n) => (T(), y("rect", {
1702
- x: t,
1703
- y: A(p)(e.y[n]),
1704
- height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1705
- rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1706
- width: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1707
- fill: `url(#pattern_${F.value}_${e.absoluteIndex})`,
1708
- stroke: B.value.style.chart.backgroundColor,
1709
- "stroke-width": B.value.style.chart.bars.strokeWidth,
1710
- "stroke-linecap": "round",
1711
- "stroke-linejoin": "round",
1712
- class: We({
1713
- "vue-data-ui-bar-animated": B.value.useCssAnimation,
1714
- "vue-data-ui-bar-transition": xn.value
1715
- })
1716
- }, null, 10, yt))), 256))])) : v("", !0)], 64)) : (T(), y(h, { key: 2 }, [(T(!0), y(h, null, D(e.horizontal_x, (t, n) => (T(), y("rect", {
1717
- x: A(p)(t, G.value.left),
1718
- y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1719
- width: A(p)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1720
- rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1721
- height: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1722
- fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
1723
- stroke: B.value.style.chart.backgroundColor,
1724
- "stroke-width": B.value.style.chart.bars.strokeWidth,
1725
- "stroke-linecap": "round",
1726
- "stroke-linejoin": "round",
1727
- class: We({
1728
- "vue-data-ui-bar-animated": B.value.useCssAnimation,
1729
- "vue-data-ui-bar-transition": xn.value
1730
- })
1731
- }, null, 10, bt))), 256)), n.$slots.pattern ? (T(), y("g", xt, [(T(!0), y(h, null, D(e.horizontal_x, (t, n) => (T(), y("rect", {
1732
- x: A(p)(t, G.value.left),
1733
- y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1734
- width: A(p)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1735
- rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1736
- height: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1737
- fill: `url(#pattern_${F.value}_${e.absoluteIndex})`,
1738
- stroke: B.value.style.chart.backgroundColor,
1739
- "stroke-width": B.value.style.chart.bars.strokeWidth,
1740
- "stroke-linecap": "round",
1741
- "stroke-linejoin": "round",
1742
- class: We({
1743
- "vue-data-ui-bar-animated": B.value.useCssAnimation,
1744
- "vue-data-ui-bar-transition": xn.value
1745
- })
1746
- }, null, 10, St))), 256))])) : v("", !0)], 64))]))), 256)),
1747
- B.value.style.chart.grid.x.showAxis ? (T(), y("line", {
1748
- key: 7,
1749
- x1: G.value.left,
1750
- x2: G.value.right,
1751
- y1: G.value.bottom,
1752
- y2: G.value.bottom,
1753
- stroke: B.value.style.chart.grid.x.axisColor,
1754
- "stroke-width": B.value.style.chart.grid.x.axisThickness,
1755
- "stroke-linecap": "round",
1756
- "stroke-linejoin": "round"
1757
- }, null, 8, Ct)) : v("", !0),
1758
- B.value.style.chart.grid.y.showAxis && !B.value.style.chart.bars.distributed ? (T(), y("line", {
1759
- key: 8,
1760
- x1: G.value.left,
1761
- x2: G.value.left,
1762
- y1: G.value.top,
1763
- y2: G.value.bottom,
1764
- stroke: B.value.style.chart.grid.y.axisColor,
1765
- "stroke-width": B.value.style.chart.grid.y.axisThickness,
1766
- "stroke-linecap": "round",
1767
- "stroke-linejoin": "round"
1768
- }, null, 8, wt)) : v("", !0),
1769
- B.value.style.chart.grid.x.axisName.show && B.value.style.chart.grid.x.axisName.text ? (T(), y("text", {
1770
- key: 9,
1771
- ref_key: "xAxisLabel",
1772
- ref: An,
1773
- x: G.value.left + G.value.width / 2,
1774
- y: G.value.chartHeight - 3,
1775
- "font-size": B.value.style.chart.grid.x.axisName.fontSize,
1776
- fill: B.value.style.chart.grid.x.axisName.color,
1777
- "font-weight": B.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1778
- "text-anchor": "middle"
1779
- }, k(B.value.style.chart.grid.x.axisName.text), 9, Tt)) : v("", !0),
1780
- B.value.style.chart.grid.y.axisName.show && B.value.style.chart.grid.y.axisName.text ? (T(), y("text", {
1781
- key: 10,
1782
- ref_key: "yAxisLabel",
1783
- ref: jn,
1784
- transform: `translate(${B.value.style.chart.grid.y.axisName.fontSize}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
1785
- "font-size": B.value.style.chart.grid.y.axisName.fontSize,
1786
- fill: B.value.style.chart.grid.y.axisName.color,
1787
- "font-weight": B.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1788
- "text-anchor": "middle"
1789
- }, k(B.value.style.chart.grid.y.axisName.text), 9, Et)) : v("", !0),
1790
- H.value.dataLabels.show && B.value.orientation === "vertical" ? (T(), y(h, { key: 11 }, [(T(!0), y(h, null, D($.value, (e, t) => (T(), y("g", null, [(T(!0), y(h, null, D(e.x, (n, r) => (T(), y(h, null, [wi(e.series[r], e.proportions[r]) ? (T(), y("text", {
1791
- key: 0,
1792
- x: n + X.value * (1 - B.value.style.chart.bars.gapRatio / 2) / 2,
1793
- y: e.y[r] + e.height[r] / 2 + B.value.style.chart.bars.dataLabels.fontSize / 3,
1794
- "font-size": B.value.style.chart.bars.dataLabels.fontSize,
1795
- fill: B.value.style.chart.bars.dataLabels.adaptColorToBackground ? A(oe)(e.color) : B.value.style.chart.bars.dataLabels.color,
1796
- "font-weight": B.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1797
- "text-anchor": "middle"
1798
- }, k(B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? Xr(e.proportions[r] * 100, e, t, r) : Yr(e.series[r], e, t, r, e.signedSeries[r])), 9, Dt)) : v("", !0)], 64))), 256))]))), 256)), B.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (T(), y("g", {
1799
- key: 0,
1800
- ref_key: "sumTop",
1801
- ref: Nn
1802
- }, [(T(!0), y(h, null, D(Jr.value, (e, t) => (T(), y(h, null, [!B.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (T(), y("text", {
1803
- key: 0,
1804
- x: G.value.left + X.value * t + X.value / 2,
1805
- y: Ui(t),
1806
- "text-anchor": "middle",
1807
- "font-size": B.value.style.chart.bars.totalValues.fontSize,
1808
- "font-weight": B.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1809
- fill: B.value.style.chart.bars.totalValues.color
1810
- }, k(Yr(e.value, e, t, e.sign)), 9, Ot)) : v("", !0)], 64))), 256))], 512)) : v("", !0)], 64)) : v("", !0),
1811
- H.value.dataLabels.show && B.value.orientation === "horizontal" ? (T(), y(h, { key: 12 }, [(T(!0), y(h, null, D($.value, (e, t) => (T(), y("g", null, [(T(!0), y(h, null, D(e.horizontal_x, (n, r) => (T(), y(h, null, [wi(e.series[r], e.proportions[r]) ? (T(), y("text", {
1812
- key: 0,
1813
- x: n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2,
1814
- y: e.horizontal_y[r] + X.value * (1 - B.value.style.chart.bars.gapRatio / 2) / 2 + B.value.style.chart.bars.dataLabels.fontSize / 3,
1815
- "font-size": B.value.style.chart.bars.dataLabels.fontSize,
1816
- fill: B.value.style.chart.bars.dataLabels.adaptColorToBackground ? A(oe)(e.color) : B.value.style.chart.bars.dataLabels.color,
1817
- "font-weight": B.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1818
- "text-anchor": "middle"
1819
- }, k(B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? Xr(e.proportions[r] * 100, e, t, r) : Yr(e.series[r], e, t, r, e.signedSeries[r])), 9, kt)) : v("", !0)], 64))), 256))]))), 256)), B.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (T(), y("g", {
1820
- key: 0,
1821
- ref_key: "sumRight",
1822
- ref: Pn
1823
- }, [(T(!0), y(h, null, D(Jr.value, (e, t) => (T(), y(h, null, [!B.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (T(), y("text", {
1824
- key: 0,
1825
- x: Wi(t),
1826
- y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.bars.totalValues.fontSize / 3,
1827
- "text-anchor": "start",
1828
- "font-size": B.value.style.chart.bars.totalValues.fontSize,
1829
- "font-weight": B.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1830
- fill: B.value.style.chart.bars.totalValues.color
1831
- }, k(Yr(e.value, e, t, e.sign)), 9, At)) : v("", !0)], 64))), 256))], 512)) : v("", !0)], 64)) : v("", !0),
1832
- B.value.style.chart.grid.y.axisLabels.show && !B.value.style.chart.bars.distributed && B.value.orientation === "vertical" ? (T(), y("g", {
1833
- key: 13,
1834
- ref_key: "scaleLabels",
1835
- ref: Mn
1836
- }, [(T(!0), y(h, null, D(Z.value, (e, t) => (T(), y("line", {
1837
- x1: G.value.left,
1838
- x2: G.value.left - 6,
1839
- y1: e.y,
1840
- y2: e.y,
1841
- stroke: B.value.style.chart.grid.x.axisColor,
1842
- "stroke-width": 1
1843
- }, null, 8, jt))), 256)), (T(!0), y(h, null, D(Z.value, (e, t) => (T(), y("text", {
1844
- x: e.x,
1845
- y: e.y + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
1846
- "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
1847
- "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1848
- fill: B.value.style.chart.grid.y.axisLabels.color,
1849
- "text-anchor": "end"
1850
- }, k(A(m)(B.value.style.chart.grid.y.axisLabels.formatter, e.value, A(r)({
1851
- p: B.value.style.chart.bars.dataLabels.prefix,
1852
- v: e.value,
1853
- s: B.value.style.chart.bars.dataLabels.suffix,
1854
- r: B.value.style.chart.grid.y.axisLabels.rounding
1855
- }), { datapoint: e })), 9, Mt))), 256))], 512)) : v("", !0),
1856
- B.value.style.chart.grid.y.axisLabels.show && !B.value.style.chart.bars.distributed && B.value.orientation === "horizontal" ? (T(), y("g", {
1857
- key: 14,
1858
- ref_key: "scaleLabels",
1859
- ref: Mn
1860
- }, [(T(!0), y(h, null, D(Z.value, (e, t) => (T(), y("line", {
1861
- x1: e.horizontal_x,
1862
- x2: e.horizontal_x,
1863
- y1: G.value.bottom,
1864
- y2: G.value.bottom + 6,
1865
- stroke: B.value.style.chart.grid.x.axisColor,
1866
- "stroke-width": 1,
1867
- "stroke-linecap": "round"
1868
- }, null, 8, Nt))), 256)), (T(!0), y(h, null, D(Z.value, (e, t) => (T(), y("text", {
1869
- class: "vue-data-ui-time-label",
1870
- "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1871
- "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1872
- fill: B.value.style.chart.grid.y.axisLabels.color,
1873
- "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1874
- transform: `translate(${e.horizontal_x}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`
1875
- }, k(A(m)(B.value.style.chart.grid.y.axisLabels.formatter, e.value, A(r)({
1876
- p: B.value.style.chart.bars.dataLabels.prefix,
1877
- v: e.value,
1878
- s: B.value.style.chart.bars.dataLabels.suffix,
1879
- r: B.value.style.chart.grid.y.axisLabels.rounding
1880
- }), { datapoint: e })), 9, Pt))), 256))], 512)) : v("", !0),
1881
- B.value.style.chart.grid.x.timeLabels.show && B.value.orientation === "vertical" ? (T(), y("g", {
1882
- key: 15,
1883
- ref_key: "timeLabelsEls",
1884
- ref: R
1885
- }, [n.$slots["time-label"] ? (T(), y("g", Ft, [(T(!0), y(h, null, D(Hr.value, (e, t) => (T(), y("g", null, [O(n.$slots, "time-label", He({ ref_for: !0 }, {
1886
- x: G.value.left + X.value * t + X.value / 2,
1887
- y: G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY,
1888
- fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
1889
- fill: B.value.style.chart.grid.x.timeLabels.color,
1890
- transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`,
1891
- absoluteIndex: e.absoluteIndex,
1892
- content: e.text,
1893
- textAnchor: B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1894
- show: !0
1895
- }), void 0, !0)]))), 256))])) : (T(), y("g", It, [(T(!0), y(h, null, D(Hr.value, (e, n) => (T(), y("g", null, [String(e.text).includes("\n") ? (T(), y("text", {
1896
- key: n + "-multi",
1897
- "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1898
- "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1899
- fill: B.value.style.chart.grid.x.timeLabels.color,
1900
- transform: `
1901
- translate(
1902
- ${G.value.left + X.value * n + X.value / 2},
1903
- ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}
1904
- ),
1905
- rotate(${B.value.style.chart.grid.x.timeLabels.rotation})
1906
- `,
1907
- style: w({ cursor: V.value ? "pointer" : "default" }),
1908
- innerHTML: A(t)({
1909
- content: String(e.text),
1910
- fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
1911
- fill: B.value.style.chart.grid.x.timeLabels.color,
1912
- x: 0,
1913
- y: 0
1914
- }),
1915
- onClick: () => Si(e, n)
1916
- }, null, 12, Rt)) : (T(), y("text", {
1917
- class: "vue-data-ui-time-label",
1918
- key: n,
1919
- "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1920
- "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1921
- "font-weight": B.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1922
- fill: B.value.style.chart.grid.x.timeLabels.color,
1923
- transform: `translate(${G.value.left + X.value * n + X.value / 2}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`,
1924
- style: w({ cursor: V.value ? "pointer" : "default" }),
1925
- onClick: () => Si(e, n)
1926
- }, k(e.text), 13, Lt))]))), 256))]))], 512)) : v("", !0),
1927
- B.value.style.chart.grid.x.timeLabels.show && B.value.orientation === "horizontal" ? (T(), y("g", {
1928
- key: 16,
1929
- ref_key: "timeLabelsEls",
1930
- ref: R
1931
- }, [n.$slots["time-label"] ? (T(), y("g", zt, [(T(!0), y(h, null, D(Q.value, (e, t) => (T(), y("g", null, [O(n.$slots, "time-label", He({ ref_for: !0 }, {
1932
- x: G.value.left - 8,
1933
- y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
1934
- fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
1935
- fill: B.value.style.chart.grid.x.timeLabels.color,
1936
- transform: null,
1937
- absoluteIndex: e.absoluteIndex,
1938
- content: e.text,
1939
- textAnchor: "end",
1940
- show: !0
1941
- }), void 0, !0)]))), 256))])) : (T(), y("g", Bt, [(T(!0), y(h, null, D(Q.value, (e, t) => (T(), y("g", null, [String(e.text).includes("\n") ? (T(), y("text", {
1942
- key: 1,
1943
- "text-anchor": "end",
1944
- "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
1945
- "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1946
- fill: B.value.style.chart.grid.y.axisLabels.color,
1947
- x: G.value.left - 8,
1948
- y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
1949
- style: w({ cursor: V.value ? "pointer" : "default" }),
1950
- onClick: () => Si(e, t),
1951
- innerHTML: A(ee)({
1952
- content: String(e.text),
1953
- fontSize: B.value.style.chart.grid.y.axisLabels.fontSize,
1954
- fill: B.value.style.chart.grid.y.axisLabels.color,
1955
- x: G.value.left - 8,
1956
- y: 0
1957
- })
1958
- }, null, 12, Ht)) : (T(), y("text", {
1959
- key: 0,
1960
- "text-anchor": "end",
1961
- "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
1962
- "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1963
- fill: B.value.style.chart.grid.y.axisLabels.color,
1964
- x: G.value.left - 8,
1965
- y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
1966
- style: w({ cursor: V.value ? "pointer" : "default" }),
1967
- onClick: () => Si(e, t)
1968
- }, k(e.text), 13, Vt))]))), 256))]))], 512)) : v("", !0),
1969
- H.value.showTooltip && B.value.orientation === "vertical" ? (T(!0), y(h, { key: 17 }, D(J.value.end - J.value.start, (e, t) => (T(), y("rect", {
1970
- x: G.value.left + t * X.value,
1971
- y: G.value.top,
1972
- width: X.value,
1973
- height: G.value.height < 0 ? 0 : G.value.height,
1974
- onClick: () => Zr(t),
1975
- onMouseenter: () => ni(t, "pointer"),
1976
- onMouseleave: () => $r(t),
1977
- fill: t === L.value || t === Gn.value ? B.value.style.chart.highlighter.color : "transparent",
1978
- style: w({ opacity: B.value.style.chart.highlighter.opacity / 100 })
1979
- }, null, 44, Ut))), 256)) : v("", !0),
1980
- H.value.showTooltip && B.value.orientation === "horizontal" ? (T(!0), y(h, { key: 18 }, D(J.value.end - J.value.start, (e, t) => (T(), y("rect", {
1981
- x: G.value.left,
1982
- y: G.value.top + t * X.value,
1983
- width: G.value.width < 0 ? 0 : G.value.width,
1984
- height: X.value,
1985
- onClick: () => Zr(t),
1986
- onMouseenter: () => ni(t, "pointer"),
1987
- onMouseleave: () => $r(t),
1988
- fill: t === L.value || t === Gn.value ? B.value.style.chart.highlighter.color : "transparent",
1989
- style: w({ opacity: B.value.style.chart.highlighter.opacity / 100 })
1990
- }, null, 44, Wt))), 256)) : v("", !0),
1991
- Er.value ? (T(), y("rect", He({ key: 19 }, wr.value, {
1992
- "data-start": J.value.start,
1993
- "data-end": J.value.end
1994
- }), null, 16, Gt)) : v("", !0),
1995
- O(n.$slots, "svg", { svg: {
1996
- drawingArea: G.value,
1997
- data: $.value,
1998
- isPrintingImg: A(ar) || A(or) || On.value,
1999
- isPrintingSvg: kn.value
2000
- } }, void 0, !0)
2001
- ], 46, it)), n.$slots.hint ? (T(), y("div", Kt, [O(n.$slots, "hint", C(S({
2002
- hint: B.value.a11y.translations.keyboardNavigation,
2003
- isVisible: Ki.value
2004
- })), void 0, !0)])) : v("", !0)]),
2005
- n.$slots.watermark ? (T(), y("div", qt, [O(n.$slots, "watermark", C(S({ isPrinting: A(ar) || A(or) || On.value || kn.value })), void 0, !0)])) : v("", !0),
2006
- B.value.style.chart.zoom.show && dn.value && Ii.value && q.value > 6 ? (T(), _(je, {
2007
- key: 5,
2008
- ref_key: "chartSlicer",
2009
- ref: vn,
2010
- allMinimaps: Fr.value,
2011
- background: B.value.style.chart.zoom.color,
2012
- borderColor: B.value.style.chart.backgroundColor,
2013
- customFormat: B.value.style.chart.zoom.customFormat,
2014
- cutNullValues: !1,
2015
- forceZeroCenter: !0,
2016
- enableRangeHandles: B.value.style.chart.zoom.enableRangeHandles,
2017
- enableSelectionDrag: B.value.style.chart.zoom.enableSelectionDrag,
2018
- end: J.value.end,
2019
- focusOnDrag: B.value.style.chart.zoom.focusOnDrag,
2020
- focusRangeRatio: B.value.style.chart.zoom.focusRangeRatio,
2021
- fontSize: B.value.style.chart.zoom.fontSize,
2022
- immediate: !B.value.style.chart.zoom.preview.enable,
2023
- inputColor: B.value.style.chart.zoom.color,
2024
- isPreview: Er.value,
2025
- labelLeft: B.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Q.value?.[0]?.text ?? "" : "",
2026
- labelRight: B.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Q.value?.at(-1)?.text ?? "" : "",
2027
- max: Math.max(...e.dataset.map((e) => e.series.length)),
2028
- min: 0,
2029
- minimap: Pr.value,
2030
- minimapCompact: B.value.style.chart.zoom.minimap.compact,
2031
- minimapFrameColor: B.value.style.chart.zoom.minimap.frameColor,
2032
- minimapIndicatorColor: B.value.style.chart.zoom.minimap.indicatorColor,
2033
- minimapMerged: !1,
2034
- minimapSelectedColor: B.value.style.chart.zoom.minimap.selectedColor,
2035
- minimapSelectedColorOpacity: B.value.style.chart.zoom.minimap.selectedColorOpacity,
2036
- minimapSelectedIndex: L.value,
2037
- minimapSelectionRadius: 1,
2038
- preciseLabels: Kr.value.length ? Kr.value : Rr.value,
2039
- refreshEndPoint: B.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : B.value.style.chart.zoom.endIndex + 1,
2040
- refreshStartPoint: B.value.style.chart.zoom.startIndex === null ? 0 : B.value.style.chart.zoom.startIndex,
2041
- selectColor: B.value.style.chart.zoom.highlightColor,
2042
- selectedSeries: ei.value,
2043
- smoothMinimap: !1,
2044
- start: J.value.start,
2045
- textColor: B.value.style.chart.color,
2046
- timeLabels: Rr.value,
2047
- usePreciseLabels: B.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !B.value.style.chart.zoom.useDefaultFormat,
2048
- valueEnd: J.value.end,
2049
- valueStart: J.value.start,
2050
- verticalHandles: B.value.style.chart.zoom.minimap.verticalHandles,
2051
- maxWidth: B.value.style.chart.zoom.maxWidth,
2052
- isCursorPointer: V.value,
2053
- additionalMinimapHeight: B.value.style.chart.zoom.minimap.additionalHeight,
2054
- handleType: B.value.style.chart.zoom.minimap.handleType,
2055
- handleIconColor: B.value.style.chart.zoom.minimap.handleIconColor,
2056
- handleBorderWidth: B.value.style.chart.zoom.minimap.handleBorderWidth,
2057
- handleBorderColor: B.value.style.chart.zoom.minimap.handleBorderColor,
2058
- handleFill: B.value.style.chart.zoom.minimap.handleFill,
2059
- handleWidth: B.value.style.chart.zoom.minimap.handleWidth,
2060
- "onUpdate:end": Bi,
2061
- "onUpdate:start": zi,
2062
- onTrapMouse: Tr,
2063
- onReset: a[0] ||= () => jr({ force: !0 }),
2064
- onFutureEnd: a[1] ||= (e) => Dr("end", e),
2065
- onFutureStart: a[2] ||= (e) => Dr("start", e)
2066
- }, {
2067
- "reset-action": j(({ reset: e }) => [O(n.$slots, "reset-action", C(S({ reset: e })), void 0, !0)]),
2068
- slotMap: j(({ width: e, height: t, unitW: n }) => [(T(!0), y(h, null, D($.value, (e) => (T(), y("g", { key: e.id }, [(T(!0), y(h, null, D(e.xMinimap({
2069
- left: 0,
2070
- unitW: n
2071
- }), (r, a) => (T(), y("rect", {
2072
- key: a,
2073
- x: a === 0 ? r - n * (B.value.style.chart.bars.gapRatio / 4) : r - n / 2,
2074
- y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
2075
- height: e.heightMinimap({ minimapH: t })[a],
2076
- width: [0, q.value - 1].includes(a) ? n * (1 - B.value.style.chart.bars.gapRatio / 2) / 2 : n * (1 - B.value.style.chart.bars.gapRatio / 2),
2077
- fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
2078
- stroke: B.value.style.chart.backgroundColor,
2079
- "stroke-width": .5,
2080
- rx: "0",
2081
- "stroke-linecap": "round",
2082
- "stroke-linejoin": "round",
2083
- style: w({ opacity: a >= Y.value.start && a <= Y.value.end ? 1 : .62 })
2084
- }, null, 12, Jt))), 128))]))), 128))]),
2085
- _: 3
2086
- }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : v("", !0),
2087
- Ve(A(Qt), {
2088
- teleportTo: B.value.style.chart.tooltip.teleportTo,
2089
- show: H.value.showTooltip && fn.value,
2090
- backgroundColor: B.value.style.chart.tooltip.backgroundColor,
2091
- color: B.value.style.chart.tooltip.color,
2092
- fontSize: B.value.style.chart.tooltip.fontSize,
2093
- borderRadius: B.value.style.chart.tooltip.borderRadius,
2094
- borderColor: B.value.style.chart.tooltip.borderColor,
2095
- borderWidth: B.value.style.chart.tooltip.borderWidth,
2096
- backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
2097
- position: B.value.style.chart.tooltip.position,
2098
- offsetX: B.value.style.chart.tooltip.offsetX,
2099
- offsetY: B.value.style.chart.tooltip.offsetY,
2100
- parent: P.value,
2101
- content: mn.value,
2102
- isFullscreen: bn.value,
2103
- isCustom: A(ae)(B.value.style.chart.tooltip.customFormat),
2104
- smooth: B.value.style.chart.tooltip.smooth,
2105
- backdropFilter: B.value.style.chart.tooltip.backdropFilter,
2106
- smoothForce: B.value.style.chart.tooltip.smoothForce,
2107
- smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThreshold,
2108
- isA11yMode: Bn.value === "keyboard",
2109
- a11yPosition: zn.value
2110
- }, {
2111
- "tooltip-before": j(() => [O(n.$slots, "tooltip-before", C(S({ ...pn.value })), void 0, !0)]),
2112
- tooltip: j(() => [O(n.$slots, "tooltip", C(S({ ...pn.value })), void 0, !0)]),
2113
- "tooltip-after": j(() => [O(n.$slots, "tooltip-after", C(S({ ...pn.value })), void 0, !0)]),
2114
- _: 3
2115
- }, 8, [
2116
- "teleportTo",
2117
- "show",
2118
- "backgroundColor",
2119
- "color",
2120
- "fontSize",
2121
- "borderRadius",
2122
- "borderColor",
2123
- "borderWidth",
2124
- "backgroundOpacity",
2125
- "position",
2126
- "offsetX",
2127
- "offsetY",
2128
- "parent",
2129
- "content",
2130
- "isFullscreen",
2131
- "isCustom",
2132
- "smooth",
2133
- "backdropFilter",
2134
- "smoothForce",
2135
- "smoothSnapThreshold",
2136
- "isA11yMode",
2137
- "a11yPosition"
2138
- ]),
2139
- b("div", { id: `legend-bottom-${F.value}` }, null, 8, Yt),
2140
- Tn.value && (B.value.style.chart.legend.show || n.$slots.legend) ? (T(), _(Re, {
2141
- key: 6,
2142
- to: B.value.style.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
2143
- }, [b("div", {
2144
- ref_key: "chartLegend",
2145
- ref: _n
2146
- }, [O(n.$slots, "legend", { legend: vi.value }, () => [B.value.style.chart.legend.show ? (T(), _(Ie, {
2147
- key: 0,
2148
- legendSet: vi.value,
2149
- config: yi.value,
2150
- isCursorPointer: V.value,
2151
- onClickMarker: a[3] ||= ({ legend: e }) => e.segregate()
2152
- }, ze({
2153
- item: j(({ legend: e }) => [A(qn) ? v("", !0) : (T(), y("div", {
2154
- key: 0,
2155
- onClick: (t) => e.segregate(),
2156
- style: w(`opacity:${I.value.includes(e.id) ? .5 : 1}`)
2157
- }, k(e.name), 13, Xt))]),
2158
- legendToggle: j(() => [vi.value.length > 2 && B.value.style.chart.legend.selectAllToggle.show && !A(qn) ? (T(), _(Me, {
2159
- key: 0,
2160
- backgroundColor: B.value.style.chart.legend.selectAllToggle.backgroundColor,
2161
- color: B.value.style.chart.legend.selectAllToggle.color,
2162
- fontSize: B.value.style.chart.legend.fontSize,
2163
- checked: I.value.length > 0,
2164
- isCursorPointer: V.value,
2165
- onToggle: pi
2166
- }, null, 8, [
2167
- "backgroundColor",
2168
- "color",
2169
- "fontSize",
2170
- "checked",
2171
- "isCursorPointer"
2172
- ])) : v("", !0)]),
2173
- _: 2
2174
- }, [n.$slots.pattern ? {
2175
- name: "legend-pattern",
2176
- fn: j(({ legend: e, index: t }) => [Ve(De, {
2177
- shape: e.shape,
2178
- radius: 30,
2179
- stroke: "none",
2180
- plot: {
2181
- x: 30,
2182
- y: 30
2183
- },
2184
- fill: `url(#pattern_${F.value}_${t})`
2185
- }, null, 8, ["shape", "fill"])]),
2186
- key: "0"
2187
- } : void 0]), 1032, [
2188
- "legendSet",
2189
- "config",
2190
- "isCursorPointer"
2191
- ])) : v("", !0)], !0)], 512)], 8, ["to"])) : v("", !0),
2192
- n.$slots.source ? (T(), y("div", {
2193
- key: 7,
2194
- ref_key: "source",
2195
- ref: yn,
2196
- dir: "auto"
2197
- }, [O(n.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
2198
- dn.value && B.value.userOptions.buttons.table ? (T(), _(qe(Ei.value.component), He({ key: 8 }, Ei.value.props, {
2199
- ref_key: "tableUnit",
2200
- ref: En,
2201
- onClose: Di
2202
- }), ze({
2203
- content: j(() => [Ve(A(tn), {
2204
- colNames: fi.value.colNames,
2205
- head: fi.value.head,
2206
- body: fi.value.body,
2207
- config: fi.value.config,
2208
- title: B.value.table.useDialog ? "" : Ei.value.title,
2209
- withCloseButton: !B.value.table.useDialog,
2210
- isCursorPointer: V.value,
2211
- onClose: Di
2212
- }, {
2213
- th: j(({ th: e }) => [b("div", { innerHTML: e }, null, 8, Zt)]),
2214
- td: j(({ td: e }) => [Be(k(isNaN(Number(e)) ? e : A(r)({
2215
- p: B.value.style.chart.bars.dataLabels.prefix,
2216
- v: e,
2217
- s: B.value.style.chart.bars.dataLabels.suffix,
2218
- r: B.value.table.td.roundingValue
2219
- })), 1)]),
2220
- _: 1
2221
- }, 8, [
2222
- "colNames",
2223
- "head",
2224
- "body",
2225
- "config",
2226
- "title",
2227
- "withCloseButton",
2228
- "isCursorPointer"
2229
- ])]),
2230
- _: 2
2231
- }, [B.value.table.useDialog ? {
2232
- name: "title",
2233
- fn: j(() => [Be(k(Ei.value.title), 1)]),
2234
- key: "0"
2235
- } : void 0, B.value.table.useDialog ? {
2236
- name: "actions",
2237
- fn: j(() => [b("button", {
2238
- tabindex: "0",
2239
- class: "vue-ui-user-options-button",
2240
- onClick: a[4] ||= (e) => di(B.value.userOptions.callbacks.csv),
2241
- style: w({ cursor: V.value ? "pointer" : "default" })
2242
- }, [Ve(A($t), {
2243
- name: "fileCsv",
2244
- stroke: Ei.value.props.color
2245
- }, null, 8, ["stroke"])], 4)]),
2246
- key: "1"
2247
- } : void 0]), 1040)) : v("", !0),
2248
- O(n.$slots, "skeleton", {}, () => [A(qn) ? (T(), _(ye, { key: 0 })) : v("", !0)], !0)
2249
- ], 46, et));
2250
- }
2251
- }, [["__scopeId", "data-v-2ec4f189"]]);
2252
- //#endregion
2253
- export { $e as n, Qt as t };