vue-data-ui 3.22.11 → 3.22.13

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