vue-data-ui 3.22.6 → 3.22.7

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