vue-data-ui 3.15.12 → 3.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -1,2001 +0,0 @@
1
- import { defineAsyncComponent as le, useSlots as Ql, computed as g, ref as h, shallowRef as wt, onMounted as jl, toRefs as eo, watch as Te, onBeforeUnmount as Je, watchEffect as $e, nextTick as Lt, openBlock as s, createElementBlock as n, normalizeStyle as X, normalizeClass as ye, createBlock as j, unref as m, withCtx as w, renderSlot as k, normalizeProps as B, guardReactiveProps as U, createCommentVNode as y, createElementVNode as oe, createSlots as Ct, createVNode as Ae, Fragment as x, renderList as L, mergeProps as Pe, toDisplayString as H, Teleport as to, resolveDynamicComponent as ao, createTextVNode as Ma } from "vue";
2
- import { u as lo } from "./useConfig-CIgyKZ6R.js";
3
- import { j as _a, t as Ta, m as oo, p as Ze, n as ro, o as $a, q as Aa, r as so, s as no, aq as Ne, E as Pa, D as Na, I as io, X as uo, x as co, G as ce, W as Fa, k as fe, l as re, Z as vo, ar as ho, T as Ra, a0 as go, a1 as mo, U as yo } from "./lib-GwPnJSrY.js";
4
- import { t as Ia, u as fo } from "./useResponsive-DfdjqQps.js";
5
- import { u as Oa, a as Da, b as bo } from "./useTimeLabels-C-A2uZKi.js";
6
- import { u as po } from "./usePrinter-DiK5R6k-.js";
7
- import { u as xo, B as ko } from "./BaseScanner-BhhkKVoj.js";
8
- import { u as wo } from "./useSvgExport-ByUukOZt.js";
9
- import { u as St } from "./useNestedProp-BBT0mbHh.js";
10
- import { u as Lo } from "./useThemeCheck-D1ZYXUwG.js";
11
- import { u as Co } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { u as So } from "./useStableElementSize-DCNs0Tx7.js";
13
- import { u as zo } from "./useChartAccessibility-9icAAmYg.js";
14
- import { u as Mo } from "./useTimeLabelCollider-CIsgDrl9.js";
15
- import _o from "./img-BYYzY_QU.js";
16
- import To from "./Title-BfyrP-jp.js";
17
- import { _ as $o } from "./Shape-CSyWYgXc.js";
18
- import Ao from "./vue_ui_stackbar-CuDC4O4b.js";
19
- import Po from "./Legend-1LMMsPxL.js";
20
- import { S as No } from "./SlicerPreview-I2J0UUF_.js";
21
- import { B as Fo } from "./BaseLegendToggle-Y61xahI4.js";
22
- import { _ as Ro } from "./_plugin-vue_export-helper-CHgC5LLL.js";
23
- const Io = ["id"], Oo = ["id"], Do = ["xmlns", "viewBox"], Eo = ["x", "y", "width", "height"], Vo = { key: 1 }, Bo = ["id"], Uo = ["stop-color"], Ho = ["stop-color"], Wo = ["stop-color"], qo = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Yo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Xo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Go = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Jo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Zo = { key: 0 }, Ko = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Qo = { key: 0 }, jo = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], er = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], tr = { key: 0 }, ar = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], lr = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], or = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rr = ["x", "y", "font-size", "fill", "font-weight"], sr = ["transform", "font-size", "fill", "font-weight"], nr = ["x", "y", "font-size", "fill", "font-weight"], ir = ["x", "y", "font-size", "font-weight", "fill"], ur = ["x", "y", "font-size", "fill", "font-weight"], cr = ["x", "y", "font-size", "font-weight", "fill"], vr = ["x1", "x2", "y1", "y2", "stroke"], hr = ["x", "y", "font-size", "font-weight", "fill"], dr = ["x1", "x2", "y1", "y2", "stroke"], gr = ["font-size", "font-weight", "fill", "text-anchor", "transform"], mr = { key: 0 }, yr = { key: 1 }, fr = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], br = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], pr = { key: 0 }, xr = { key: 1 }, kr = ["font-size", "font-weight", "fill", "x", "y", "onClick"], wr = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Lr = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Cr = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Sr = ["data-start", "data-end"], zr = {
24
- key: 3,
25
- class: "vue-data-ui-watermark"
26
- }, Mr = ["x", "y", "height", "width", "fill", "stroke"], _r = ["id"], Tr = ["onClick"], $r = ["innerHTML"], Ar = {
27
- __name: "vue-ui-stackbar",
28
- props: {
29
- config: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- },
35
- dataset: {
36
- type: Array,
37
- default() {
38
- return [];
39
- }
40
- },
41
- selectedXIndex: {
42
- type: Number,
43
- default: void 0
44
- }
45
- },
46
- emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX", "copyAlt"],
47
- setup(Ke, { expose: Ea, emit: Va }) {
48
- const Ba = le(() => import("./Tooltip-DL3QgjZf.js")), Ua = le(() => import("./BaseIcon-CNx8Tzl5.js")), Ha = le(() => import("./vue-ui-accordion-BGHTqIBt.js")), Wa = le(() => import("./DataTable-Bo1pmAqG.js")), qa = le(() => import("./PenAndPaper-DWV1FMIi.js")), Ya = le(() => import("./UserOptions-CrLqEimB.js")), Xa = le(() => import("./PackageVersion-DN9d0ME5.js")), Ga = le(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_stackbar: Ja } = lo(), { isThemeValid: Za, warnInvalidTheme: Ka } = Lo(), Qa = Ql(), P = Ke, ve = Va, be = g({
49
- get() {
50
- return !!P.dataset && P.dataset.length;
51
- },
52
- set(t) {
53
- return t;
54
- }
55
- }), Z = h(null), W = h(_a()), Qe = h(!1), je = h(null), et = h(""), _ = h([]), zt = h(0), Mt = h(null), _t = h(null), pe = h(null), Tt = h(null), xe = h(!1), K = h(null), se = h(!1), $t = h(0), ja = h(0), el = h(0), At = h(!1), ke = h(null), tt = h(null), Fe = h(!1), Re = h(!1), Ie = h(null), at = h(null), ne = h(null), ie = h(null), tl = h(null), lt = h(null), Pt = wt(null), Nt = h(!1), Ft = h(0), Rt = h(0), It = So({
56
- elementRef: Pt,
57
- minimumWidth: 2,
58
- minimumHeight: 2,
59
- stableFramesRequired: 2,
60
- once: !1,
61
- onSizeAccepted: () => {
62
- Dt();
63
- }
64
- });
65
- function ot() {
66
- Pt.value = Z.value?.parentNode ?? null;
67
- }
68
- function Ot() {
69
- return new Promise((t) => {
70
- requestAnimationFrame(() => {
71
- requestAnimationFrame(t);
72
- });
73
- });
74
- }
75
- async function Dt() {
76
- const t = ++Rt.value;
77
- Nt.value = !1, await Lt(), await Ot(), await Ot(), t === Rt.value && (Ft.value += 1, Nt.value = !0);
78
- }
79
- const rt = h(null);
80
- jl(() => {
81
- At.value = !0, ot(), It.start(), Yt();
82
- });
83
- const e = h(ut()), q = g(() => e.value.userOptions.useCursorPointer), al = g(() => Ta({
84
- defaultConfig: {
85
- userOptions: { show: !1 },
86
- useCssAnimation: !1,
87
- table: { show: !1 },
88
- tooltip: { show: !1 },
89
- style: {
90
- chart: {
91
- backgroundColor: "#99999930",
92
- bars: {
93
- totalValues: { show: !1 },
94
- dataLabels: { show: !1 }
95
- },
96
- grid: {
97
- frame: {
98
- stroke: "#6A6A6A"
99
- },
100
- scale: {
101
- scaleMin: 0,
102
- scaleMax: 40
103
- },
104
- x: {
105
- axisColor: "#6A6A6A",
106
- linesColor: "#6A6A6A",
107
- axisName: { show: !1 },
108
- timeLabels: { show: !1 }
109
- },
110
- y: {
111
- axisColor: "#6A6A6A",
112
- linesColor: "#6A6A6A",
113
- axisName: { show: !1 },
114
- axisLabels: { show: !1 }
115
- }
116
- },
117
- legend: {
118
- backgroundColor: "transparent"
119
- },
120
- padding: {
121
- left: 24,
122
- right: 24,
123
- bottom: 12
124
- },
125
- zoom: {
126
- show: !1,
127
- startIndex: null,
128
- endIndex: null
129
- }
130
- }
131
- }
132
- },
133
- userConfig: e.value.skeletonConfig ?? {}
134
- })), { loading: he, FINAL_DATASET: st, manualLoading: Oe } = xo({
135
- ...eo(P),
136
- FINAL_CONFIG: e,
137
- prepareConfig: ut,
138
- callback: () => {
139
- Promise.resolve().then(async () => {
140
- await Ye();
141
- });
142
- },
143
- skeletonDataset: P.config?.skeletonDataset ?? [
144
- {
145
- name: "",
146
- series: [2, 3, 5, 8, 13, 21],
147
- color: "#BABABA"
148
- },
149
- {
150
- name: "",
151
- series: [1, 2, 3, 5, 8, 13],
152
- color: "#CACACA"
153
- }
154
- ],
155
- skeletonConfig: Ta({
156
- defaultConfig: e.value,
157
- userConfig: al.value
158
- })
159
- }), { userOptionsVisible: nt, setUserOptionsVisibility: Et, keepUserOptionState: Vt } = Co({ config: e.value }), { svgRef: it } = zo({ config: e.value.style.chart.title });
160
- function ll() {
161
- Et(!0);
162
- }
163
- function ol() {
164
- Et(!1), ve("selectX", { seriesIndex: null, datapoint: null }), K.value = null;
165
- }
166
- function ut() {
167
- const t = St({
168
- userConfig: P.config,
169
- defaultConfig: Ja
170
- });
171
- let l = {};
172
- const a = t.theme;
173
- if (a)
174
- if (!Za.value(t))
175
- Ka(t), l = t;
176
- else {
177
- const o = St({
178
- userConfig: Ao[a] || P.config,
179
- defaultConfig: t
180
- });
181
- l = {
182
- ...St({
183
- userConfig: P.config,
184
- defaultConfig: o
185
- }),
186
- customPalette: t.customPalette.length ? t.customPalette : oo[a] || Ze
187
- };
188
- }
189
- else
190
- l = t;
191
- return l;
192
- }
193
- const Bt = g(() => e.value.style.chart.bars.dataLabels.hideUnderValue != null), Ut = g(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
194
- Te(() => P.config, (t) => {
195
- he.value || (e.value = ut()), nt.value = !e.value.userOptions.showOnChartHover, Yt(), $t.value += 1, ja.value += 1, el.value += 1, $.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show, ot(), Ve();
196
- }, { deep: !0 }), Te(() => P.dataset, (t) => {
197
- Array.isArray(t) && t.length > 0 && (Oe.value = !1), ot(), Zt();
198
- }, { deep: !0 });
199
- const $ = h({
200
- dataLabels: {
201
- show: e.value.style.chart.bars.dataLabels.show
202
- },
203
- showTable: e.value.table.show,
204
- showTooltip: e.value.style.chart.tooltip.show
205
- });
206
- Te(e, () => {
207
- $.value = {
208
- dataLabels: {
209
- show: e.value.style.chart.bars.dataLabels.show
210
- },
211
- showTable: e.value.table.show,
212
- showTooltip: e.value.style.chart.tooltip.show
213
- };
214
- }, { immediate: !0 });
215
- const { isPrinting: ct, isImaging: vt, generatePdf: Ht, generateImage: Wt } = po({
216
- elementId: `stackbar_${W.value}`,
217
- fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
218
- options: e.value.userOptions.print
219
- }), ee = h({
220
- width: e.value.style.chart.width,
221
- height: e.value.style.chart.height,
222
- paddingRatio: {
223
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
224
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
225
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
226
- left: e.value.style.chart.padding.left / e.value.style.chart.width
227
- }
228
- }), rl = g(() => ro(e.value.customPalette)), te = wt(null), de = wt(null), qt = h(null), ht = g(() => !!e.value.debug);
229
- function Yt() {
230
- if ($a(P.dataset) ? (Aa({
231
- componentName: "VueUiStackbar",
232
- type: "dataset",
233
- debug: ht.value
234
- }), Oe.value = !0) : P.dataset.forEach((t, l) => {
235
- so({
236
- datasetObject: t,
237
- requiredAttributes: ["name", "series"]
238
- }).forEach((a) => {
239
- be.value = !1, Aa({
240
- componentName: "VueUiStackbar",
241
- type: "datasetSerieAttribute",
242
- property: a,
243
- index: l,
244
- debug: ht.value
245
- }), Oe.value = !0;
246
- });
247
- }), $a(P.dataset) || (Oe.value = e.value.loading), setTimeout(() => {
248
- se.value = !0;
249
- }, 10), e.value.responsive) {
250
- const t = Ia(() => {
251
- se.value = !1;
252
- const { width: l, height: a } = fo({
253
- chart: Z.value,
254
- title: e.value.style.chart.title.text ? Mt.value : null,
255
- legend: e.value.style.chart.legend.show ? _t.value : null,
256
- slicer: e.value.style.chart.zoom.show && N.value > 6 ? pe.value.$el : null,
257
- source: Tt.value
258
- });
259
- requestAnimationFrame(() => {
260
- ee.value.width = l, ee.value.height = a - 12, clearTimeout(qt.value), qt.value = setTimeout(() => {
261
- se.value = !0;
262
- }, 10);
263
- });
264
- });
265
- te.value && (de.value && te.value.unobserve(de.value), te.value.disconnect()), te.value = new ResizeObserver(t), de.value = Z.value.parentNode, te.value.observe(de.value);
266
- }
267
- Dt(), Ye();
268
- }
269
- Je(() => {
270
- It.stop(), te.value && (de.value && te.value.unobserve(de.value), te.value.disconnect());
271
- });
272
- function sl() {
273
- let t = 0;
274
- e.value.orientation === "vertical" && ne.value && (t = Array.from(ne.value.querySelectorAll("text")).reduce((o, c) => {
275
- const r = c.getComputedTextLength();
276
- return r > o ? r : o;
277
- }, 0)), e.value.orientation === "horizontal" && ie.value && (t = Array.from(ie.value.querySelectorAll("text")).reduce((o, c) => {
278
- const r = c.getComputedTextLength();
279
- return r > o ? r : o;
280
- }, 0));
281
- const l = at.value ? at.value.getBoundingClientRect().width : 0;
282
- return t + l + (l ? 24 : 0);
283
- }
284
- const nl = h(0), De = h(0), il = Ia((t) => {
285
- De.value = t + e.value.style.chart.bars.totalValues.fontSize;
286
- }, 100);
287
- function ul() {
288
- if (e.value.orientation !== "horizontal") return 0;
289
- const t = lt.value;
290
- if (!t) return 0;
291
- const l = Array.from(t.querySelectorAll("text"));
292
- if (!l.length) return 0;
293
- let a = -1 / 0;
294
- for (const c of l)
295
- try {
296
- const r = c.getBBox(), b = r.x + r.width;
297
- b > a && (a = b);
298
- } catch {
299
- }
300
- return Math.max(0, a - (u.value?.right ?? 0));
301
- }
302
- $e((t) => {
303
- if (e.value.orientation !== "horizontal") return;
304
- const l = lt.value;
305
- if (!l) return;
306
- const a = () => {
307
- const r = ul();
308
- il(r);
309
- };
310
- a();
311
- const o = new ResizeObserver(a);
312
- o.observe(l);
313
- const c = new MutationObserver(a);
314
- c.observe(l, { childList: !0, subtree: !0, characterData: !0 }), t(() => {
315
- o.disconnect(), c.disconnect();
316
- });
317
- }), Je(() => {
318
- nl.value = 0, De.value = 0;
319
- });
320
- const Ee = h(0), we = h(0);
321
- function cl() {
322
- const t = e.value.orientation === "vertical" ? ie.value : ne.value;
323
- if (!t) {
324
- Ee.value = 0;
325
- return;
326
- }
327
- try {
328
- const l = t.getBBox();
329
- Ee.value = Number.isFinite(l?.height) ? l.height : 0;
330
- } catch {
331
- Ee.value = 0;
332
- }
333
- }
334
- function vl() {
335
- we.value && cancelAnimationFrame(we.value), we.value = requestAnimationFrame(() => {
336
- requestAnimationFrame(() => {
337
- cl();
338
- });
339
- });
340
- }
341
- Je(() => {
342
- we.value && cancelAnimationFrame(we.value);
343
- });
344
- const Xt = g(() => {
345
- let t = 0;
346
- if (Ie.value)
347
- try {
348
- t = Ie.value.getBBox().height;
349
- } catch {
350
- t = 0;
351
- }
352
- const l = e.value.style.chart.grid.x.timeLabels.show ? Ee.value : 0;
353
- return t + l;
354
- }), u = g(() => {
355
- Ft.value;
356
- const { height: t, width: l } = ee.value, { right: a } = ee.value.paddingRatio;
357
- let o = e.value.style.chart.bars.totalValues.show && P.dataset && P.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
358
- e.value.style.chart.grid.y.axisLabels.show && (c = sl());
359
- const r = e.value.style.chart.padding.top + o, b = l - l * a - De.value, S = t - e.value.style.chart.padding.bottom - Xt.value - o, T = e.value.style.chart.padding.left + c, R = l - T - l * a - De.value, A = t - r - e.value.style.chart.padding.bottom - Xt.value - o;
360
- return {
361
- chartHeight: t,
362
- chartWidth: l,
363
- top: r,
364
- right: b,
365
- bottom: S,
366
- left: T,
367
- width: Math.max(0, R),
368
- height: Math.max(0, A)
369
- };
370
- }), hl = g(() => {
371
- const { left: t, top: l, width: a, height: o } = u.value, c = v.value.start, r = v.value.end, b = Math.max(1, r - c), S = Math.max(0, Math.min(b, (E.value.start ?? c) - c)), T = Math.max(0, Math.min(b, (E.value.end ?? r) - c)), R = Math.max(0, T - S), A = {
372
- fill: e.value.style.chart.zoom.preview.fill,
373
- stroke: e.value.style.chart.zoom.preview.stroke,
374
- "stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
375
- "stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
376
- "stroke-linecap": "round",
377
- "stroke-linejoin": "round",
378
- style: {
379
- pointerEvents: "none",
380
- transition: "none !important",
381
- animation: "none !important"
382
- }
383
- };
384
- if (e.value.orientation === "horizontal") {
385
- const O = o / b;
386
- return {
387
- x: t,
388
- y: l + S * O,
389
- width: a,
390
- height: R * O,
391
- ...A
392
- };
393
- } else {
394
- const O = a / b;
395
- return {
396
- x: t + S * O,
397
- y: l,
398
- width: R * O,
399
- height: o,
400
- ...A
401
- };
402
- }
403
- }), D = g(() => st.value.map((t, l) => {
404
- const a = no(t.color) || rl.value[l] || Ze[l] || Ze[l % Ze.length];
405
- return {
406
- ...t,
407
- // In distributed mode, all values are converted to positive
408
- series: JSON.parse(JSON.stringify(t.series)).map((o) => e.value.style.chart.bars.distributed ? Math.abs(o) : o),
409
- // Store signs to manage display of neg values in distributed mode
410
- signedSeries: t.series.map((o) => o >= 0 ? 1 : -1),
411
- absoluteIndex: l,
412
- id: _a(),
413
- color: a
414
- };
415
- })), N = g(() => {
416
- const t = Math.max(...D.value.filter((l) => !_.value.includes(l.id)).map((l) => l.series.length));
417
- return isFinite(t) ? t : Math.max(...D.value.map((l) => l.series.length));
418
- });
419
- function dl(t) {
420
- rt.value = t;
421
- }
422
- const v = h({
423
- start: 0,
424
- end: Math.max(...st.value.map((t) => t.series.length))
425
- }), E = h({ start: 0, end: Math.max(...st.value.map((t) => t.series.length)) }), Gt = g(() => e.value.style.chart.zoom.preview.enable && (E.value.start !== v.value.start || E.value.end !== v.value.end));
426
- function Jt(t, l) {
427
- E.value[t] = l;
428
- }
429
- function Ve() {
430
- const t = N.value;
431
- let l = Math.max(0, Math.min(v.value.start ?? 0, t - 1)), a = Math.max(l + 1, Math.min(v.value.end ?? t, t));
432
- (!Number.isFinite(l) || !Number.isFinite(a) || a <= l) && (l = 0, a = t), v.value.start = l, v.value.end = a, E.value.start = l, E.value.end = a, pe.value && (pe.value.setStartValue(l), pe.value.setEndValue(a));
433
- }
434
- const Le = h(null);
435
- function gl() {
436
- return new Promise((t) => requestAnimationFrame(
437
- () => requestAnimationFrame(() => t())
438
- ));
439
- }
440
- Je(() => {
441
- Le.value && cancelAnimationFrame(Le.value);
442
- });
443
- async function Zt() {
444
- Ye(), await Lt(), Le.value && cancelAnimationFrame(Le.value), Le.value = requestAnimationFrame(async () => {
445
- await gl(), Ye();
446
- });
447
- }
448
- const p = g(() => {
449
- let t;
450
- return e.value.orientation === "vertical" ? t = u.value.width / (v.value.end - v.value.start) : t = u.value.height / (v.value.end - v.value.start), t <= 0 ? 0 : t;
451
- }), Ce = g(() => Ne(D.value.filter((t) => !_.value.includes(t.id))).slice(v.value.start, v.value.end)), Kt = g(() => _.value.length === D.value.length), ue = g(() => e.value.style.chart.zoom.minimap.show ? Ne(D.value.map((t) => ({
452
- ...t,
453
- series: t.series.map((l) => l ?? 0)
454
- })).filter((t) => Kt.value ? !0 : !_.value.includes(t.id))) : []), ml = g(() => e.value.style.chart.zoom.minimap.show ? [{
455
- name: "",
456
- series: ue.value,
457
- color: "#000000",
458
- isVisible: !0
459
- }] : []), yl = g(() => Ne(D.value.filter((t) => !_.value.includes(t.id)).map((t) => ({
460
- ...t,
461
- series: t.series.map((l, a) => t.signedSeries[a] === -1 && l >= 0 ? -l : l)
462
- }))).slice(v.value.start, v.value.end)), Be = g(() => {
463
- const t = D.value.filter((l) => !_.value.includes(l.id));
464
- return {
465
- positive: Ne(t.map((l) => ({
466
- ...l,
467
- series: l.series.slice(v.value.start, v.value.end).map((a) => a >= 0 ? a : 0)
468
- }))),
469
- negative: Ne(t.map((l) => ({
470
- ...l,
471
- series: l.series.slice(v.value.start, v.value.end).map((a) => a < 0 ? a : 0)
472
- })))
473
- };
474
- }), Y = g(() => {
475
- const t = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...Be.value.positive), l = Math.min(...Be.value.negative), a = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(l) ? 0 : l, o = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Pa(a > 0 ? 0 : a, t < 0 ? 0 : t, e.value.style.chart.grid.scale.ticks) : Na(a > 0 ? 0 : a, t < 0 ? 0 : t, e.value.style.chart.grid.scale.ticks);
476
- return o.ticks.map((c) => ({
477
- zero: u.value.bottom - u.value.height * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
478
- y: u.value.bottom - u.value.height * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
479
- x: u.value.left - 8,
480
- horizontal_zero: u.value.left + u.value.width * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
481
- horizontal_x: u.value.left + u.value.width * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
482
- horizontal_y: u.value.bottom - 8,
483
- value: c
484
- }));
485
- }), F = h([]), ge = h([]);
486
- let Qt = 0;
487
- $e(() => {
488
- const t = ++Qt;
489
- (async () => {
490
- const l = await Oa({
491
- values: e.value.style.chart.grid.x.timeLabels.values,
492
- maxDatapoints: N.value,
493
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
494
- start: v.value.start,
495
- end: v.value.end
496
- });
497
- t === Qt && (F.value = l);
498
- })();
499
- });
500
- let jt = 0;
501
- $e(() => {
502
- const t = ++jt;
503
- (async () => {
504
- const l = await Oa({
505
- values: e.value.style.chart.grid.x.timeLabels.values,
506
- maxDatapoints: N.value,
507
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
508
- start: 0,
509
- end: N.value
510
- });
511
- t === jt && (ge.value = l);
512
- })();
513
- });
514
- const fl = g(() => {
515
- const t = e.value.style.chart.grid.x.timeLabels.modulo;
516
- return F.value.length ? Math.min(t, [...new Set(F.value.map((l) => l.text))].length) : t;
517
- }), dt = g(() => {
518
- const t = e.value.style.chart.grid.x.timeLabels, l = F.value || [], a = ge.value || [], o = v.value.start ?? 0, c = K.value, r = N.value, b = l.map((T) => T?.text ?? ""), S = a.map((T) => T?.text ?? "");
519
- return io(
520
- !!t.showOnlyFirstAndLast,
521
- !!t.showOnlyAtModulo,
522
- Math.max(1, fl.value || 1),
523
- b,
524
- S,
525
- o,
526
- c,
527
- r
528
- );
529
- });
530
- $e(() => {
531
- e.value.orientation, e.value.style.chart.grid.x.timeLabels.show, e.value.style.chart.grid.x.timeLabels.fontSize, e.value.style.chart.grid.x.timeLabels.rotation, e.value.style.chart.grid.x.timeLabels.offsetY, dt.value?.map((t) => t?.text ?? "").join("|"), Y.value?.map((t) => t?.value ?? "").join("|"), ee.value.width, ee.value.height, ie.value, ne.value, Ie.value, vl();
532
- }, { flush: "post" });
533
- const ea = h({ months: [], shortMonths: [], days: [], shortDays: [] });
534
- let ta = 0;
535
- $e(() => {
536
- const t = ++ta, l = e.value.style.chart.grid.x.timeLabels.datetimeFormatter;
537
- (async () => {
538
- const a = await Da(l.locale).catch(() => Da("en"));
539
- t === ta && (ea.value = a.data);
540
- })();
541
- });
542
- const aa = g(() => {
543
- const t = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = bo({
544
- useUTC: t.useUTC,
545
- locale: ea.value,
546
- januaryAsYear: t.januaryAsYear
547
- });
548
- return (a, o) => {
549
- const r = e.value.style.chart.grid.x.timeLabels.values?.[a];
550
- return r == null ? "" : l.formatDate(new Date(r), o);
551
- };
552
- }), la = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
553
- text: aa.value(a, e.value.style.chart.zoom.timeFormat),
554
- absoluteIndex: a
555
- }))), gt = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
556
- text: aa.value(a, e.value.style.chart.tooltip.timeFormat),
557
- absoluteIndex: a
558
- }))), C = g(() => {
559
- if (!be.value && !he.value) return [];
560
- let t = Array(N.value).fill(0), l = Array(N.value).fill(0), a = Array(N.value).fill(0), o = Array(N.value).fill(0);
561
- const c = Math.max(...Be.value.positive) || 0, r = Math.min(...Be.value.negative), b = [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, S = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Pa(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : b > 0 ? 0 : b, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : Na(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : b > 0 ? 0 : b, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: T, max: R } = S, A = R + (T >= 0 ? 0 : Math.abs(T)) || 1, O = u.value.height, V = u.value.width, _e = Y.value[0] ? Y.value[0].zero : u.value.bottom, G = Y.value[0] ? Y.value[0].horizontal_zero : u.value.left;
562
- let wa = Array(ue.value.length).fill(0), La = Array(ue.value.length).fill(0);
563
- return D.value.filter((me) => !_.value.includes(me.id)).map((me) => {
564
- const ae = me.series.slice(), Ca = ae.map((d, f) => wa[f]), El = ae.map((d, f) => La[f]);
565
- ae.forEach((d, f) => {
566
- (Number(d) || 0) >= 0 ? wa[f] += Number(d) || 0 : La[f] += Math.abs(Number(d) || 0);
567
- });
568
- const Q = me.series.slice(v.value.start, v.value.end), Vl = me.signedSeries.slice(v.value.start, v.value.end), Bl = Q.map((d, f) => u.value.left + p.value * f + p.value * e.value.style.chart.bars.gapRatio / 4), Ge = (ue.value || []).filter(Number.isFinite), pt = Ge.length ? Math.max(...Ge) : 0, xt = Ge.length ? Math.min(...Ge) : 0;
569
- function Sa({ minimapH: d }) {
570
- const z = pt > 0, I = xt < 0;
571
- if (z && I) {
572
- const J = Math.max(pt, Math.abs(xt)) || 1e-9;
573
- return {
574
- pxPerUnit: d / 2 / J,
575
- zero: d / 2
576
- };
577
- }
578
- if (z) {
579
- const J = Math.max(1e-9, pt);
580
- return {
581
- pxPerUnit: d / J,
582
- zero: d
583
- };
584
- }
585
- const M = Math.max(1e-9, Math.abs(xt));
586
- return {
587
- pxPerUnit: d / M,
588
- zero: 0
589
- };
590
- }
591
- const Ul = ({ left: d, unitW: f }) => {
592
- const z = f * (e.value.style.chart.bars.gapRatio / 4);
593
- return ae.map((I, M) => d + f * M + z);
594
- }, Hl = Q.map((d, f) => u.value.top + p.value * f + p.value * e.value.style.chart.bars.gapRatio / 4), Wl = Q.map((d, f) => {
595
- const z = e.value.style.chart.bars.distributed ? (d || 0) / Ce.value[f] : (d || 0) / A;
596
- let I, M;
597
- return d > 0 ? (M = O * z, I = _e - M - t[f], t[f] += M) : (M = O * z, I = _e + a[f], a[f] += Math.abs(M)), I;
598
- }), ql = ({ minimapH: d }) => {
599
- if (e.value.style.chart.bars.distributed)
600
- return ae.map((M, J) => {
601
- const kt = Math.abs(Number(M) || 0), za = Math.abs(ue.value?.[J] || 0) || 1e-9, Kl = (Ca[J] + kt) / za;
602
- return d - Kl * d;
603
- });
604
- const { pxPerUnit: f, zero: z } = Sa({ minimapH: d });
605
- return ae.map((I, M) => {
606
- const J = Number(I) || 0;
607
- return J >= 0 ? z - (Ca[M] + J) * f : z + El[M] * f;
608
- });
609
- }, Yl = Q.map((d, f) => {
610
- const z = e.value.style.chart.bars.distributed ? (d || 0) / Ce.value[f] : (d || 0) / A;
611
- let I, M;
612
- return d > 0 ? (M = V * z, I = G + l[f], l[f] += M) : (M = V * z, I = G - Math.abs(M) - o[f], o[f] += Math.abs(M)), I;
613
- }), Xl = Q.map((d, f) => {
614
- const z = e.value.style.chart.bars.distributed ? (d || 0) / Ce.value[f] : (d || 0) / A;
615
- return d > 0 ? O * z : O * Math.abs(z);
616
- }), Gl = ({ minimapH: d }) => {
617
- if (e.value.style.chart.bars.distributed)
618
- return ae.map((I, M) => {
619
- const J = Math.abs(Number(I) || 0), kt = Math.abs(ue.value?.[M] || 0) || 1e-9;
620
- return J / kt * d;
621
- });
622
- const { pxPerUnit: f } = Sa({ minimapH: d });
623
- return ae.map((z) => Math.abs(Number(z) || 0) * f);
624
- }, Jl = Q.map((d, f) => {
625
- const z = e.value.style.chart.bars.distributed ? (d || 0) / Ce.value[f] : (d || 0) / A;
626
- return d > 0 ? V * z : V * Math.abs(z);
627
- }), Zl = Q.map((d) => Math.abs(d)).reduce((d, f) => d + f, 0);
628
- return {
629
- ...me,
630
- proportions: Q.map((d, f) => e.value.style.chart.bars.distributed ? (d || 0) / Ce.value[f] : (d || 0) / Zl),
631
- series: Q,
632
- signedSeries: Vl,
633
- x: Bl,
634
- y: Wl,
635
- height: Xl,
636
- horizontal_width: Jl,
637
- horizontal_y: Hl,
638
- horizontal_x: Yl,
639
- xMinimap: Ul,
640
- yMinimap: ql,
641
- heightMinimap: Gl
642
- };
643
- });
644
- }), oa = g(() => yl.value.map((t, l) => ({
645
- value: t,
646
- sign: t >= 0 ? 1 : -1
647
- })));
648
- function Ue(t, l, a, o, c) {
649
- const r = c === -1 && t >= 0 ? -t : t;
650
- return fe(
651
- e.value.style.chart.bars.dataLabels.formatter,
652
- r,
653
- re({
654
- p: e.value.style.chart.bars.dataLabels.prefix,
655
- v: r,
656
- s: e.value.style.chart.bars.dataLabels.suffix,
657
- r: e.value.style.chart.bars.dataLabels.rounding
658
- }),
659
- { datapoint: l, seriesIndex: a, datapointIndex: o }
660
- );
661
- }
662
- function ra(t, l, a, o) {
663
- return fe(
664
- e.value.style.chart.bars.dataLabels.formatter,
665
- t,
666
- re({
667
- v: isNaN(t) ? 0 : t,
668
- s: "%",
669
- r: e.value.style.chart.bars.dataLabels.rounding
670
- }),
671
- { datapoint: l, seriesIndex: a, datapointIndex: o }
672
- );
673
- }
674
- function sa(t) {
675
- const l = JSON.parse(JSON.stringify(C.value)).map((a) => ({
676
- name: a.name,
677
- value: a.series[t] === 0 ? 0 : a.series[t] || null,
678
- proportion: a.proportions[t] || null,
679
- color: a.color,
680
- id: a.id
681
- }));
682
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: t + v.value.start }), ve("selectDatapoint", { datapoint: l, period: F.value[t] });
683
- }
684
- function mt(t) {
685
- return JSON.parse(JSON.stringify(C.value)).map((l) => ({
686
- name: l.name,
687
- absoluteIndex: l.absoluteIndex,
688
- value: l.series[t] === 0 ? 0 : (l.signedSeries[t] === -1 && l.series[t] >= 0 ? -l.series[t] : l.series[t]) || null,
689
- proportion: l.proportions[t] || null,
690
- color: l.color,
691
- id: l.id,
692
- timeLabel: ge.value[t]
693
- }));
694
- }
695
- function na(t) {
696
- if (e.value.events.datapointLeave) {
697
- const l = mt(t);
698
- e.value.events.datapointLeave({ datapoint: l, seriesIndex: t + v.value.start });
699
- }
700
- Qe.value = null, K.value = null;
701
- }
702
- const bl = g(() => Array(N.value).fill(0).map((t, l) => mt(l)));
703
- Te(() => P.selectedXIndex, (t) => {
704
- if ([null, void 0].includes(P.selectedXIndex)) {
705
- K.value = null;
706
- return;
707
- }
708
- const l = t - v.value.start;
709
- l < 0 || t >= v.value.end ? K.value = null : K.value = l ?? null;
710
- }, { immediate: !0 });
711
- function ia(t) {
712
- if (Kt.value) return;
713
- K.value = t, Qe.value = !0;
714
- const l = e.value.style.chart.tooltip.customFormat, a = mt(t);
715
- Il({ seriesIndex: t, datapoint: a }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + v.value.start }), je.value = {
716
- datapoint: a,
717
- seriesIndex: t,
718
- config: e.value,
719
- series: C.value
720
- };
721
- const o = a.map((r) => Math.abs(r.value)).reduce((r, b) => r + b, 0), c = a.map((r) => ce(r.value)).reduce((r, b) => r + b, 0);
722
- if (Ra(l) && yo(() => l({
723
- seriesIndex: t,
724
- datapoint: a,
725
- series: C.value,
726
- config: e.value
727
- })))
728
- et.value = l({
729
- seriesIndex: t,
730
- datapoint: a,
731
- series: C.value,
732
- config: e.value
733
- });
734
- else {
735
- const {
736
- showValue: r,
737
- showTotal: b,
738
- totalTranslation: S,
739
- showPercentage: T,
740
- borderColor: R,
741
- roundingValue: A,
742
- roundingPercentage: O
743
- } = e.value.style.chart.tooltip;
744
- let V = "";
745
- (F.value[t] && F.value[t].text || gt.value[t] && gt.value[t].text && e.value.style.chart.tooltip.showTimeLabel) && (V += `<div style="width:100%;text-align:center;border-bottom:1px solid ${R};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? F.value[t]?.text : gt.value[t]?.text || ge.value[t]?.text || ""}</div>`), b && (V += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
746
- <span>${S}:</span>
747
- <span>
748
- ${fe(
749
- e.value.style.chart.bars.dataLabels.formatter,
750
- c,
751
- re({
752
- p: e.value.style.chart.bars.dataLabels.prefix,
753
- v: c,
754
- s: e.value.style.chart.bars.dataLabels.suffix,
755
- r: A
756
- }),
757
- { datapoint: { name: S, value: c } }
758
- )}
759
- </span>
760
- </div>`);
761
- const _e = [
762
- r && T ? "(" : "",
763
- r && T ? ")" : ""
764
- ];
765
- a.reverse().forEach((G) => {
766
- V += `
767
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
768
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${G.id})` : G.color}"/>${Qa.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${W.value}_${G.absoluteIndex})"/>` : ""}</svg>
769
- ${G.name}${r || T ? ":" : ""} ${r ? fe(
770
- e.value.style.chart.bars.dataLabels.formatter,
771
- G.value,
772
- re({
773
- p: e.value.style.chart.bars.dataLabels.prefix,
774
- v: G.value,
775
- s: e.value.style.chart.bars.dataLabels.suffix,
776
- r: A
777
- })
778
- ) : ""} ${_e[0]}${T ? re({
779
- v: isNaN(G.value / o) ? 0 : Math.abs(G.value) / o * 100,
780
- // Negs are absed to show relative proportion to absolute total. It's opinionated.
781
- s: "%",
782
- r: O
783
- }) : ""}${_e[1]}
784
- </div>
785
- `;
786
- }), et.value = `<div>${V}</div>`;
787
- }
788
- }
789
- const pl = g(() => ee.value.width), xl = g(() => ee.value.height);
790
- Mo({
791
- timeLabelsEls: e.value.orientation === "vertical" ? ie : ne,
792
- timeLabels: F,
793
- slicer: v,
794
- configRef: e,
795
- rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
796
- autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
797
- isAutoSize: !1,
798
- width: pl,
799
- height: xl,
800
- rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
801
- });
802
- function ua(t) {
803
- xe.value = t, zt.value += 1;
804
- }
805
- function ca() {
806
- $.value.showTable = !$.value.showTable;
807
- }
808
- function va() {
809
- $.value.dataLabels.show = !$.value.dataLabels.show;
810
- }
811
- function ha() {
812
- $.value.showTooltip = !$.value.showTooltip;
813
- }
814
- function kl() {
815
- return C.value;
816
- }
817
- const da = g(() => {
818
- if (C.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
819
- const t = C.value.map(({ name: a, color: o }) => ({
820
- label: a,
821
- color: o
822
- })), l = [];
823
- return F.value.forEach((a) => {
824
- const o = [e.value.style.chart.grid.x.timeLabels.values[a.absoluteIndex] ? a.text : i + 1];
825
- D.value.forEach((c) => {
826
- o.push(Number((c.series[a.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
827
- }), l.push(o);
828
- }), { head: t, body: l };
829
- });
830
- function yt(t = null) {
831
- const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = ["", ...da.value.head.map((b) => b.label)], o = da.value.body, c = l.concat([a]).concat(o), r = go(c);
832
- t ? t(r) : mo({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
833
- }
834
- const He = g(() => {
835
- const t = [""].concat(C.value.map((c) => c.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
836
- let l = [];
837
- for (let c = 0; c < N.value; c += 1) {
838
- const r = C.value.map((b) => b.series[c] ?? 0).reduce((b, S) => b + S, 0);
839
- l.push([e.value.style.chart.grid.x.timeLabels.values.slice(v.value.start, v.value.end)[c] ? F.value[c].text : c + 1].concat(C.value.map((b) => (b.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((r ?? 0).toFixed(e.value.table.td.roundingValue)));
840
- }
841
- const a = {
842
- th: {
843
- backgroundColor: e.value.table.th.backgroundColor,
844
- color: e.value.table.th.color,
845
- outline: e.value.table.th.outline
846
- },
847
- td: {
848
- backgroundColor: e.value.table.td.backgroundColor,
849
- color: e.value.table.td.color,
850
- outline: e.value.table.td.outline
851
- },
852
- breakpoint: e.value.table.responsiveBreakpoint
853
- }, o = [e.value.table.columnNames.period].concat(C.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
854
- return { head: t, body: l.slice(0, v.value.end - v.value.start), config: a, colNames: o };
855
- });
856
- function wl() {
857
- _.value.length ? _.value = [] : Se.value.forEach((t) => {
858
- _.value.push(t.id);
859
- });
860
- }
861
- function ft(t) {
862
- if (_.value.includes(t.id))
863
- _.value = _.value.filter((l) => l !== t.id);
864
- else {
865
- if (_.value.length === D.value.length - 1) return;
866
- _.value.push(t.id);
867
- }
868
- ve("selectLegend", C.value);
869
- }
870
- function ga(t) {
871
- if (!D.value.length)
872
- return e.value.debug && console.warn("VueUiStackbar - There are no series to show."), null;
873
- const l = D.value.find((a) => a.name === t);
874
- return l || (e.value.debug && console.warn(`VueUiStackbar - Series name not found "${t}"`), null);
875
- }
876
- function Ll(t) {
877
- const l = ga(t);
878
- l !== null && _.value.includes(l.id) && ft({ id: l.id });
879
- }
880
- function Cl(t) {
881
- const l = ga(t);
882
- l !== null && (_.value.includes(l.id) || ft({ id: l.id }));
883
- }
884
- const Se = g(() => D.value.map((t, l) => ({
885
- ...t,
886
- shape: "square"
887
- })).map((t) => ({
888
- ...t,
889
- opacity: _.value.includes(t.id) ? 0.5 : 1,
890
- segregate: () => ft(t),
891
- isSegregated: _.value.includes(t.id)
892
- }))), Sl = g(() => ({
893
- cy: "stackbar-legend",
894
- backgroundColor: e.value.style.chart.legend.backgroundColor,
895
- color: e.value.style.chart.legend.color,
896
- fontSize: e.value.style.chart.legend.fontSize,
897
- paddingBottom: 12,
898
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
899
- })), We = h(!1);
900
- function bt() {
901
- We.value = !We.value;
902
- }
903
- function qe(t, l) {
904
- const a = JSON.parse(JSON.stringify(C.value)).map((o) => ({
905
- name: o.name,
906
- value: o.series[l] === 0 ? 0 : (o.signedSeries[l] === -1 && o.series[l] >= 0 ? -o.series[l] : o.series[l]) || null,
907
- proportion: o.proportions[l] || null,
908
- color: o.color,
909
- id: o.id
910
- }));
911
- ve("selectTimeLabel", {
912
- datapoint: a,
913
- absoluteIndex: t.absoluteIndex,
914
- label: t.text
915
- });
916
- }
917
- const zl = g(() => Math.max(...C.value.flatMap((t) => t.series)));
918
- function ma(t, l) {
919
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ut.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : Ut.value ? (Bt.value && ht.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."), t > zl.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : Bt.value ? Math.abs(t) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? t !== 0 : !0;
920
- }
921
- async function Ml({ scale: t = 2 } = {}) {
922
- if (!Z.value) return;
923
- const { width: l, height: a } = Z.value.getBoundingClientRect(), o = l / a, { imageUri: c, base64: r } = await _o({ domElement: Z.value, base64: !0, img: !0, scale: t });
924
- return {
925
- imageUri: c,
926
- base64: r,
927
- title: e.value.style.chart.title.text,
928
- width: l,
929
- height: a,
930
- aspectRatio: o
931
- };
932
- }
933
- const ze = g(() => {
934
- const t = e.value.table.useDialog && !e.value.table.show, l = $.value.showTable;
935
- return {
936
- component: t ? Ga : Ha,
937
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
938
- props: t ? {
939
- backgroundColor: e.value.table.th.backgroundColor,
940
- color: e.value.table.th.color,
941
- headerColor: e.value.table.th.color,
942
- headerBg: e.value.table.th.backgroundColor,
943
- isFullscreen: xe.value,
944
- fullscreenParent: Z.value,
945
- forcedWidth: Math.min(800, window.innerWidth * 0.8),
946
- isCursorPointer: q.value
947
- } : {
948
- hideDetails: !0,
949
- config: {
950
- open: l,
951
- maxHeight: 1e4,
952
- body: {
953
- backgroundColor: e.value.style.chart.backgroundColor,
954
- color: e.value.style.chart.color
955
- },
956
- head: {
957
- backgroundColor: e.value.style.chart.backgroundColor,
958
- color: e.value.style.chart.color
959
- }
960
- }
961
- }
962
- };
963
- });
964
- Te(() => $.value.showTable, (t) => {
965
- e.value.table.show || (t && e.value.table.useDialog && ke.value ? ke.value.open() : "close" in ke.value && ke.value.close());
966
- });
967
- function ya() {
968
- $.value.showTable = !1, tt.value && tt.value.setTableIconState(!1);
969
- }
970
- const _l = g(() => e.value.style.chart.backgroundColor), Tl = g(() => e.value.style.chart.legend), $l = g(() => e.value.style.chart.title), { exportSvg: Al, getSvg: Pl } = wo({
971
- svg: it,
972
- title: $l,
973
- legend: Tl,
974
- legendItems: Se,
975
- backgroundColor: _l
976
- });
977
- async function fa({ isCb: t }) {
978
- Re.value = !0, await Lt();
979
- try {
980
- if (t) {
981
- const { blob: l, url: a, text: o, dataUrl: c } = await Pl();
982
- await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: l, url: a, text: o, dataUrl: c }));
983
- } else
984
- await Promise.resolve(Al());
985
- } finally {
986
- Re.value = !1;
987
- }
988
- }
989
- function Nl(t) {
990
- if (t?.stage === "start") {
991
- Fe.value = !0;
992
- return;
993
- }
994
- if (t?.stage === "end") {
995
- Fe.value = !1;
996
- return;
997
- }
998
- Wt();
999
- }
1000
- function ba(t) {
1001
- const l = N.value;
1002
- return t > l ? l : t < 0 || t < v.value.start ? e.value.style.chart.zoom.startIndex !== null ? v.value.start + 1 : 1 : t;
1003
- }
1004
- const Me = h(!1), pa = h(!1);
1005
- function Ye() {
1006
- if (!Me.value) {
1007
- Me.value = !0;
1008
- try {
1009
- const { startIndex: t, endIndex: l } = e.value.style.chart.zoom, a = N.value, o = t ?? 0, c = l != null ? Math.min(ba(l + 1), a) : a;
1010
- Xe.value = !0, v.value.start = o, v.value.end = c, E.value.start = o, E.value.end = c, Ve(), pa.value = !0;
1011
- } finally {
1012
- queueMicrotask(() => {
1013
- Xe.value = !1;
1014
- }), Me.value = !1;
1015
- }
1016
- }
1017
- }
1018
- const Xe = h(!1);
1019
- function Fl(t) {
1020
- Me.value || Xe.value || t !== v.value.start && (v.value.start = t, E.value.start = t, Ve());
1021
- }
1022
- function Rl(t) {
1023
- if (Me.value || Xe.value) return;
1024
- const l = ba(t);
1025
- l !== v.value.end && (v.value.end = l, E.value.end = l, Ve());
1026
- }
1027
- function Il({ seriesIndex: t, datapoint: l }) {
1028
- const a = v.value.start + t;
1029
- ve("selectX", {
1030
- dataset: l,
1031
- index: a,
1032
- indexLabel: e.value.style.chart.grid.x.timeLabels.values[a]
1033
- });
1034
- }
1035
- function xa() {
1036
- return { y0: Y.value?.[0]?.zero ?? u.value.bottom };
1037
- }
1038
- function Ol(t) {
1039
- const { y0: l } = xa(), a = e.value.style.chart.bars.totalValues, o = Math.max(2, a.fontSize * 0.3 + a.offsetY);
1040
- let c = 1 / 0, r = !1;
1041
- for (const R of C.value || []) {
1042
- const A = R?.series?.[t] ?? 0, O = R?.height?.[t] ?? 0, V = R?.y?.[t];
1043
- A > 0 && O > 0 && Number.isFinite(V) && (r = !0, V < c && (c = V));
1044
- }
1045
- const S = (r && Number.isFinite(c) ? c : l) - o;
1046
- return Math.min(
1047
- Math.max(S, 0),
1048
- u.value.bottom
1049
- );
1050
- }
1051
- function Dl(t) {
1052
- const { x0: l } = xa(), a = Math.max(2, e.value.style.chart.bars.totalValues.fontSize * 0.3 + e.value.style.chart.bars.totalValues.offsetX);
1053
- let o = -1 / 0, c = !1;
1054
- for (const b of C.value || []) {
1055
- const S = b?.series?.[t] ?? 0, T = b?.horizontal_x?.[t], R = b?.horizontal_width?.[t], A = Number.isFinite(R) ? Math.max(0, R) : 0;
1056
- Number.isFinite(T) && S > 0 && A > 0 && (c = !0, o = Math.max(o, T + A));
1057
- }
1058
- return (c && Number.isFinite(o) ? o : l) + a;
1059
- }
1060
- async function ka() {
1061
- if (ve("copyAlt", {
1062
- config: e.value,
1063
- dataset: C.value
1064
- }), !e.value.userOptions.callbacks.altCopy) {
1065
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1066
- return;
1067
- }
1068
- await Promise.resolve(e.value.userOptions.callbacks.altCopy({
1069
- config: e.value,
1070
- dataset: C.value
1071
- }));
1072
- }
1073
- return Ea({
1074
- getData: kl,
1075
- getImage: Ml,
1076
- generatePdf: Ht,
1077
- generateCsv: yt,
1078
- generateImage: Wt,
1079
- generateSvg: fa,
1080
- hideSeries: Cl,
1081
- showSeries: Ll,
1082
- toggleTable: ca,
1083
- toggleLabels: va,
1084
- toggleTooltip: ha,
1085
- toggleAnnotator: bt,
1086
- toggleFullscreen: ua,
1087
- copyAlt: ka
1088
- }), (t, l) => (s(), n("div", {
1089
- id: `stackbar_${W.value}`,
1090
- ref_key: "stackbarChart",
1091
- ref: Z,
1092
- class: ye({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": xe.value }),
1093
- style: X(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
1094
- onMouseenter: ll,
1095
- onMouseleave: ol
1096
- }, [
1097
- e.value.userOptions.buttons.annotator ? (s(), j(m(qa), {
1098
- key: 0,
1099
- svgRef: m(it),
1100
- backgroundColor: e.value.style.chart.backgroundColor,
1101
- color: e.value.style.chart.color,
1102
- active: We.value,
1103
- isCursorPointer: q.value,
1104
- onClose: bt
1105
- }, {
1106
- "annotator-action-close": w(() => [
1107
- k(t.$slots, "annotator-action-close", {}, void 0, !0)
1108
- ]),
1109
- "annotator-action-color": w(({ color: a }) => [
1110
- k(t.$slots, "annotator-action-color", B(U({ color: a })), void 0, !0)
1111
- ]),
1112
- "annotator-action-draw": w(({ mode: a }) => [
1113
- k(t.$slots, "annotator-action-draw", B(U({ mode: a })), void 0, !0)
1114
- ]),
1115
- "annotator-action-undo": w(({ disabled: a }) => [
1116
- k(t.$slots, "annotator-action-undo", B(U({ disabled: a })), void 0, !0)
1117
- ]),
1118
- "annotator-action-redo": w(({ disabled: a }) => [
1119
- k(t.$slots, "annotator-action-redo", B(U({ disabled: a })), void 0, !0)
1120
- ]),
1121
- "annotator-action-delete": w(({ disabled: a }) => [
1122
- k(t.$slots, "annotator-action-delete", B(U({ disabled: a })), void 0, !0)
1123
- ]),
1124
- _: 3
1125
- }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : y("", !0),
1126
- k(t.$slots, "userConfig", {}, void 0, !0),
1127
- e.value.style.chart.title.text ? (s(), n("div", {
1128
- key: 1,
1129
- ref_key: "chartTitle",
1130
- ref: Mt,
1131
- style: "width:100%;background:transparent;padding-bottom:24px"
1132
- }, [
1133
- (s(), j(To, {
1134
- key: `title_${$t.value}`,
1135
- config: {
1136
- title: {
1137
- cy: "stackbar-title",
1138
- ...e.value.style.chart.title
1139
- },
1140
- subtitle: {
1141
- cy: "stackbar-subtitle",
1142
- ...e.value.style.chart.title.subtitle
1143
- }
1144
- }
1145
- }, null, 8, ["config"]))
1146
- ], 512)) : y("", !0),
1147
- oe("div", {
1148
- id: `legend-top-${W.value}`
1149
- }, null, 8, Oo),
1150
- e.value.userOptions.show && be.value && (m(Vt) || m(nt)) ? (s(), j(m(Ya), {
1151
- ref_key: "userOptionsRef",
1152
- ref: tt,
1153
- key: `user_option_${zt.value}`,
1154
- backgroundColor: e.value.style.chart.backgroundColor,
1155
- color: e.value.style.chart.color,
1156
- isPrinting: m(ct),
1157
- isImaging: m(vt),
1158
- uid: W.value,
1159
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1160
- hasPdf: e.value.userOptions.buttons.pdf,
1161
- hasImg: e.value.userOptions.buttons.img,
1162
- hasSvg: e.value.userOptions.buttons.svg,
1163
- hasXls: e.value.userOptions.buttons.csv,
1164
- hasTable: e.value.userOptions.buttons.table,
1165
- hasLabel: e.value.userOptions.buttons.labels,
1166
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
1167
- hasAltCopy: e.value.userOptions.buttons.altCopy,
1168
- isFullscreen: xe.value,
1169
- chartElement: Z.value,
1170
- position: e.value.userOptions.position,
1171
- isTooltip: $.value.showTooltip,
1172
- titles: { ...e.value.userOptions.buttonTitles },
1173
- hasAnnotator: e.value.userOptions.buttons.annotator,
1174
- isAnnotation: We.value,
1175
- callbacks: e.value.userOptions.callbacks,
1176
- printScale: e.value.userOptions.print.scale,
1177
- tableDialog: e.value.table.useDialog,
1178
- isCursorPointer: q.value,
1179
- onToggleFullscreen: ua,
1180
- onGeneratePdf: m(Ht),
1181
- onGenerateCsv: yt,
1182
- onGenerateImage: Nl,
1183
- onGenerateSvg: fa,
1184
- onToggleTable: ca,
1185
- onToggleLabels: va,
1186
- onToggleTooltip: ha,
1187
- onToggleAnnotator: bt,
1188
- onCopyAlt: ka,
1189
- style: X({
1190
- visibility: m(Vt) ? m(nt) ? "visible" : "hidden" : "visible"
1191
- })
1192
- }, Ct({ _: 2 }, [
1193
- t.$slots.menuIcon ? {
1194
- name: "menuIcon",
1195
- fn: w(({ isOpen: a, color: o }) => [
1196
- k(t.$slots, "menuIcon", B(U({ isOpen: a, color: o })), void 0, !0)
1197
- ]),
1198
- key: "0"
1199
- } : void 0,
1200
- t.$slots.optionTooltip ? {
1201
- name: "optionTooltip",
1202
- fn: w(() => [
1203
- k(t.$slots, "optionTooltip", {}, void 0, !0)
1204
- ]),
1205
- key: "1"
1206
- } : void 0,
1207
- t.$slots.optionPdf ? {
1208
- name: "optionPdf",
1209
- fn: w(() => [
1210
- k(t.$slots, "optionPdf", {}, void 0, !0)
1211
- ]),
1212
- key: "2"
1213
- } : void 0,
1214
- t.$slots.optionCsv ? {
1215
- name: "optionCsv",
1216
- fn: w(() => [
1217
- k(t.$slots, "optionCsv", {}, void 0, !0)
1218
- ]),
1219
- key: "3"
1220
- } : void 0,
1221
- t.$slots.optionImg ? {
1222
- name: "optionImg",
1223
- fn: w(() => [
1224
- k(t.$slots, "optionImg", {}, void 0, !0)
1225
- ]),
1226
- key: "4"
1227
- } : void 0,
1228
- t.$slots.optionSvg ? {
1229
- name: "optionSvg",
1230
- fn: w(() => [
1231
- k(t.$slots, "optionSvg", {}, void 0, !0)
1232
- ]),
1233
- key: "5"
1234
- } : void 0,
1235
- t.$slots.optionTable ? {
1236
- name: "optionTable",
1237
- fn: w(() => [
1238
- k(t.$slots, "optionTable", {}, void 0, !0)
1239
- ]),
1240
- key: "6"
1241
- } : void 0,
1242
- t.$slots.optionLabels ? {
1243
- name: "optionLabels",
1244
- fn: w(() => [
1245
- k(t.$slots, "optionLabels", {}, void 0, !0)
1246
- ]),
1247
- key: "7"
1248
- } : void 0,
1249
- t.$slots.optionFullscreen ? {
1250
- name: "optionFullscreen",
1251
- fn: w(({ toggleFullscreen: a, isFullscreen: o }) => [
1252
- k(t.$slots, "optionFullscreen", B(U({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
1253
- ]),
1254
- key: "8"
1255
- } : void 0,
1256
- t.$slots.optionAnnotator ? {
1257
- name: "optionAnnotator",
1258
- fn: w(({ toggleAnnotator: a, isAnnotator: o }) => [
1259
- k(t.$slots, "optionAnnotator", B(U({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
1260
- ]),
1261
- key: "9"
1262
- } : void 0,
1263
- t.$slots.optionAltCopy ? {
1264
- name: "optionAltCopy",
1265
- fn: w(({ altCopy: a }) => [
1266
- k(t.$slots, "optionAltCopy", B(U({ altCopy: a })), void 0, !0)
1267
- ]),
1268
- key: "10"
1269
- } : void 0
1270
- ]), 1032, ["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"])) : y("", !0),
1271
- (s(), n("svg", {
1272
- ref_key: "svgRef",
1273
- ref: it,
1274
- xmlns: m(uo),
1275
- viewBox: `0 0 ${u.value.chartWidth <= 0 ? 10 : u.value.chartWidth} ${u.value.chartHeight <= 0 ? 10 : u.value.chartHeight}`,
1276
- class: ye({ "vue-data-ui-loading": m(he) }),
1277
- style: X(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
1278
- }, [
1279
- Ae(m(Xa)),
1280
- t.$slots["chart-background"] ? (s(), n("foreignObject", {
1281
- key: 0,
1282
- x: u.value.left,
1283
- y: u.value.top,
1284
- width: u.value.width <= 0 ? 10 : u.value.width,
1285
- height: u.value.height <= 0 ? 10 : u.value.height,
1286
- style: {
1287
- pointerEvents: "none"
1288
- }
1289
- }, [
1290
- k(t.$slots, "chart-background", {}, void 0, !0)
1291
- ], 8, Eo)) : y("", !0),
1292
- e.value.style.chart.bars.gradient.show ? (s(), n("defs", Vo, [
1293
- (s(!0), n(x, null, L(C.value, (a, o) => (s(), n("linearGradient", {
1294
- id: `gradient_${a.id}`,
1295
- x1: "0%",
1296
- y1: "0%",
1297
- x2: "0%",
1298
- y2: "100%"
1299
- }, [
1300
- oe("stop", {
1301
- offset: "0%",
1302
- "stop-color": a.color
1303
- }, null, 8, Uo),
1304
- oe("stop", {
1305
- offset: "61.8%",
1306
- "stop-color": m(co)(a.color, e.value.style.chart.bars.gradient.intensity / 100)
1307
- }, null, 8, Ho),
1308
- oe("stop", {
1309
- offset: "100%",
1310
- "stop-color": a.color
1311
- }, null, 8, Wo)
1312
- ], 8, Bo))), 256))
1313
- ])) : y("", !0),
1314
- e.value.style.chart.grid.frame.show ? (s(), n("rect", {
1315
- key: 2,
1316
- style: { pointerEvents: "none", transition: "none", animation: "none !important" },
1317
- x: Math.max(0, u.value.left),
1318
- y: Math.max(0, u.value.top),
1319
- width: Math.max(0, u.value.width),
1320
- height: Math.max(0, u.value.height),
1321
- fill: "transparent",
1322
- stroke: e.value.style.chart.grid.frame.stroke,
1323
- "stroke-width": e.value.style.chart.grid.frame.strokeWidth,
1324
- "stroke-linecap": e.value.style.chart.grid.frame.strokeLinecap,
1325
- "stroke-linejoin": e.value.style.chart.grid.frame.strokeLinejoin,
1326
- "stroke-dasharray": e.value.style.chart.grid.frame.strokeDasharray
1327
- }, null, 8, qo)) : y("", !0),
1328
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 3 }, L(Y.value, (a, o) => (s(), n("line", {
1329
- x1: u.value.left,
1330
- x2: u.value.right,
1331
- y1: a.y,
1332
- y2: a.y,
1333
- stroke: e.value.style.chart.grid.x.linesColor,
1334
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1335
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1336
- "stroke-linecap": "round"
1337
- }, null, 8, Yo))), 256)) : y("", !0),
1338
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 4 }, L(v.value.end - v.value.start + 1, (a, o) => (s(), n("line", {
1339
- x1: u.value.left,
1340
- x2: u.value.right,
1341
- y1: u.value.top + p.value * o,
1342
- y2: u.value.top + p.value * o,
1343
- stroke: e.value.style.chart.grid.x.linesColor,
1344
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1345
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1346
- "stroke-linecap": "round"
1347
- }, null, 8, Xo))), 256)) : y("", !0),
1348
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 5 }, L(v.value.end - v.value.start + 1, (a, o) => (s(), n("line", {
1349
- x1: u.value.left + p.value * o,
1350
- x2: u.value.left + p.value * o,
1351
- y1: u.value.top,
1352
- y2: u.value.bottom,
1353
- stroke: e.value.style.chart.grid.y.linesColor,
1354
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1355
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1356
- "stroke-linecap": "round"
1357
- }, null, 8, Go))), 256)) : y("", !0),
1358
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 6 }, L(Y.value, (a, o) => (s(), n("line", {
1359
- x1: a.horizontal_x,
1360
- x2: a.horizontal_x,
1361
- y1: u.value.top,
1362
- y2: u.value.bottom,
1363
- stroke: e.value.style.chart.grid.y.linesColor,
1364
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1365
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1366
- "stroke-linecap": "round"
1367
- }, null, 8, Jo))), 256)) : y("", !0),
1368
- (s(!0), n(x, null, L(C.value, (a, o) => (s(), n("g", null, [
1369
- t.$slots.pattern ? (s(), n("defs", Zo, [
1370
- k(t.$slots, "pattern", Pe({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${W.value}_${a.absoluteIndex}` }), void 0, !0)
1371
- ])) : y("", !0),
1372
- e.value.orientation === "vertical" ? (s(), n(x, { key: 1 }, [
1373
- (s(!0), n(x, null, L(a.x, (c, r) => (s(), n("rect", {
1374
- x: c,
1375
- y: m(ce)(a.y[r]),
1376
- height: a.height[r] < 0 ? 1e-4 : a.height[r] || 0,
1377
- rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1378
- width: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1379
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${a.id})` : a.color,
1380
- stroke: e.value.style.chart.backgroundColor,
1381
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1382
- "stroke-linecap": "round",
1383
- "stroke-linejoin": "round",
1384
- class: ye({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": se.value })
1385
- }, null, 10, Ko))), 256)),
1386
- t.$slots.pattern ? (s(), n("g", Qo, [
1387
- (s(!0), n(x, null, L(a.x, (c, r) => (s(), n("rect", {
1388
- x: c,
1389
- y: m(ce)(a.y[r]),
1390
- height: a.height[r] < 0 ? 1e-4 : a.height[r] || 0,
1391
- rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1392
- width: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1393
- fill: `url(#pattern_${W.value}_${a.absoluteIndex})`,
1394
- stroke: e.value.style.chart.backgroundColor,
1395
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1396
- "stroke-linecap": "round",
1397
- "stroke-linejoin": "round",
1398
- class: ye({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": se.value })
1399
- }, null, 10, jo))), 256))
1400
- ])) : y("", !0)
1401
- ], 64)) : (s(), n(x, { key: 2 }, [
1402
- (s(!0), n(x, null, L(a.horizontal_x, (c, r) => (s(), n("rect", {
1403
- x: m(ce)(c, u.value.left),
1404
- y: a.horizontal_y[r] < 0 ? 0 : a.horizontal_y[r],
1405
- width: m(ce)(a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]),
1406
- rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1407
- height: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1408
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${a.id})` : a.color,
1409
- stroke: e.value.style.chart.backgroundColor,
1410
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1411
- "stroke-linecap": "round",
1412
- "stroke-linejoin": "round",
1413
- class: ye({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": se.value })
1414
- }, null, 10, er))), 256)),
1415
- t.$slots.pattern ? (s(), n("g", tr, [
1416
- (s(!0), n(x, null, L(a.horizontal_x, (c, r) => (s(), n("rect", {
1417
- x: m(ce)(c, u.value.left),
1418
- y: a.horizontal_y[r] < 0 ? 0 : a.horizontal_y[r],
1419
- width: m(ce)(a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]),
1420
- rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1421
- height: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1422
- fill: `url(#pattern_${W.value}_${a.absoluteIndex})`,
1423
- stroke: e.value.style.chart.backgroundColor,
1424
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1425
- "stroke-linecap": "round",
1426
- "stroke-linejoin": "round",
1427
- class: ye({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": se.value })
1428
- }, null, 10, ar))), 256))
1429
- ])) : y("", !0)
1430
- ], 64))
1431
- ]))), 256)),
1432
- e.value.style.chart.grid.x.showAxis ? (s(), n("line", {
1433
- key: 7,
1434
- x1: u.value.left,
1435
- x2: u.value.right,
1436
- y1: u.value.bottom,
1437
- y2: u.value.bottom,
1438
- stroke: e.value.style.chart.grid.x.axisColor,
1439
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
1440
- "stroke-linecap": "round",
1441
- "stroke-linejoin": "round"
1442
- }, null, 8, lr)) : y("", !0),
1443
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), n("line", {
1444
- key: 8,
1445
- x1: u.value.left,
1446
- x2: u.value.left,
1447
- y1: u.value.top,
1448
- y2: u.value.bottom,
1449
- stroke: e.value.style.chart.grid.y.axisColor,
1450
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
1451
- "stroke-linecap": "round",
1452
- "stroke-linejoin": "round"
1453
- }, null, 8, or)) : y("", !0),
1454
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), n("text", {
1455
- key: 9,
1456
- ref_key: "xAxisLabel",
1457
- ref: Ie,
1458
- x: u.value.left + u.value.width / 2,
1459
- y: u.value.chartHeight - 3,
1460
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
1461
- fill: e.value.style.chart.grid.x.axisName.color,
1462
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1463
- "text-anchor": "middle"
1464
- }, H(e.value.style.chart.grid.x.axisName.text), 9, rr)) : y("", !0),
1465
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), n("text", {
1466
- key: 10,
1467
- ref_key: "yAxisLabel",
1468
- ref: at,
1469
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${u.value.top + u.value.height / 2}) rotate(-90)`,
1470
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1471
- fill: e.value.style.chart.grid.y.axisName.color,
1472
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1473
- "text-anchor": "middle"
1474
- }, H(e.value.style.chart.grid.y.axisName.text), 9, sr)) : y("", !0),
1475
- $.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), n(x, { key: 11 }, [
1476
- (s(!0), n(x, null, L(C.value, (a, o) => (s(), n("g", null, [
1477
- (s(!0), n(x, null, L(a.x, (c, r) => (s(), n(x, null, [
1478
- ma(a.series[r], a.proportions[r]) ? (s(), n("text", {
1479
- key: 0,
1480
- x: c + p.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
1481
- y: a.y[r] + a.height[r] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1482
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1483
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(Fa)(a.color) : e.value.style.chart.bars.dataLabels.color,
1484
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1485
- "text-anchor": "middle"
1486
- }, H(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ra(a.proportions[r] * 100, a, o, r) : Ue(a.series[r], a, o, r, a.signedSeries[r])), 9, nr)) : y("", !0)
1487
- ], 64))), 256))
1488
- ]))), 256)),
1489
- e.value.style.chart.bars.totalValues.show && C.value.length > 1 ? (s(), n("g", {
1490
- key: 0,
1491
- ref_key: "sumTop",
1492
- ref: tl
1493
- }, [
1494
- (s(!0), n(x, null, L(oa.value, (a, o) => (s(), n(x, null, [
1495
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || a.value !== 0 ? (s(), n("text", {
1496
- key: 0,
1497
- x: u.value.left + p.value * o + p.value / 2,
1498
- y: Ol(o),
1499
- "text-anchor": "middle",
1500
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1501
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1502
- fill: e.value.style.chart.bars.totalValues.color
1503
- }, H(Ue(a.value, a, o, a.sign)), 9, ir)) : y("", !0)
1504
- ], 64))), 256))
1505
- ], 512)) : y("", !0)
1506
- ], 64)) : y("", !0),
1507
- $.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), n(x, { key: 12 }, [
1508
- (s(!0), n(x, null, L(C.value, (a, o) => (s(), n("g", null, [
1509
- (s(!0), n(x, null, L(a.horizontal_x, (c, r) => (s(), n(x, null, [
1510
- ma(a.series[r], a.proportions[r]) ? (s(), n("text", {
1511
- key: 0,
1512
- x: c + (a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]) / 2,
1513
- y: a.horizontal_y[r] + p.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1514
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1515
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(Fa)(a.color) : e.value.style.chart.bars.dataLabels.color,
1516
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1517
- "text-anchor": "middle"
1518
- }, H(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ra(a.proportions[r] * 100, a, o, r) : Ue(a.series[r], a, o, r, a.signedSeries[r])), 9, ur)) : y("", !0)
1519
- ], 64))), 256))
1520
- ]))), 256)),
1521
- e.value.style.chart.bars.totalValues.show && C.value.length > 1 ? (s(), n("g", {
1522
- key: 0,
1523
- ref_key: "sumRight",
1524
- ref: lt
1525
- }, [
1526
- (s(!0), n(x, null, L(oa.value, (a, o) => (s(), n(x, null, [
1527
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || a.value !== 0 ? (s(), n("text", {
1528
- key: 0,
1529
- x: Dl(o),
1530
- y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.bars.totalValues.fontSize / 3,
1531
- "text-anchor": "start",
1532
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1533
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1534
- fill: e.value.style.chart.bars.totalValues.color
1535
- }, H(Ue(a.value, a, o, a.sign)), 9, cr)) : y("", !0)
1536
- ], 64))), 256))
1537
- ], 512)) : y("", !0)
1538
- ], 64)) : y("", !0),
1539
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), n("g", {
1540
- key: 13,
1541
- ref_key: "scaleLabels",
1542
- ref: ne
1543
- }, [
1544
- (s(!0), n(x, null, L(Y.value, (a, o) => (s(), n("line", {
1545
- x1: u.value.left,
1546
- x2: u.value.left - 6,
1547
- y1: a.y,
1548
- y2: a.y,
1549
- stroke: e.value.style.chart.grid.x.axisColor,
1550
- "stroke-width": 1
1551
- }, null, 8, vr))), 256)),
1552
- (s(!0), n(x, null, L(Y.value, (a, o) => (s(), n("text", {
1553
- x: a.x,
1554
- y: a.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1555
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1556
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1557
- fill: e.value.style.chart.grid.y.axisLabels.color,
1558
- "text-anchor": "end"
1559
- }, H(m(fe)(
1560
- e.value.style.chart.grid.y.axisLabels.formatter,
1561
- a.value,
1562
- m(re)({
1563
- p: e.value.style.chart.bars.dataLabels.prefix,
1564
- v: a.value,
1565
- s: e.value.style.chart.bars.dataLabels.suffix,
1566
- r: e.value.style.chart.grid.y.axisLabels.rounding
1567
- }),
1568
- { datapoint: a }
1569
- )), 9, hr))), 256))
1570
- ], 512)) : y("", !0),
1571
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), n("g", {
1572
- key: 14,
1573
- ref_key: "scaleLabels",
1574
- ref: ne
1575
- }, [
1576
- (s(!0), n(x, null, L(Y.value, (a, o) => (s(), n("line", {
1577
- x1: a.horizontal_x,
1578
- x2: a.horizontal_x,
1579
- y1: u.value.bottom,
1580
- y2: u.value.bottom + 6,
1581
- stroke: e.value.style.chart.grid.x.axisColor,
1582
- "stroke-width": 1,
1583
- "stroke-linecap": "round"
1584
- }, null, 8, dr))), 256)),
1585
- (s(!0), n(x, null, L(Y.value, (a, o) => (s(), n("text", {
1586
- class: "vue-data-ui-time-label",
1587
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1588
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1589
- fill: e.value.style.chart.grid.y.axisLabels.color,
1590
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1591
- transform: `translate(${a.horizontal_x}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
1592
- }, H(m(fe)(
1593
- e.value.style.chart.grid.y.axisLabels.formatter,
1594
- a.value,
1595
- m(re)({
1596
- p: e.value.style.chart.bars.dataLabels.prefix,
1597
- v: a.value,
1598
- s: e.value.style.chart.bars.dataLabels.suffix,
1599
- r: e.value.style.chart.grid.y.axisLabels.rounding
1600
- }),
1601
- { datapoint: a }
1602
- )), 9, gr))), 256))
1603
- ], 512)) : y("", !0),
1604
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(), n("g", {
1605
- key: 15,
1606
- ref_key: "timeLabelsEls",
1607
- ref: ie
1608
- }, [
1609
- t.$slots["time-label"] ? (s(), n("g", mr, [
1610
- (s(!0), n(x, null, L(dt.value, (a, o) => (s(), n("g", null, [
1611
- k(t.$slots, "time-label", Pe({ ref_for: !0 }, {
1612
- x: u.value.left + p.value * o + p.value / 2,
1613
- y: u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1614
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1615
- fill: e.value.style.chart.grid.x.timeLabels.color,
1616
- transform: `translate(${u.value.left + p.value * o + p.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1617
- absoluteIndex: a.absoluteIndex,
1618
- content: a.text,
1619
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1620
- show: !0
1621
- }), void 0, !0)
1622
- ]))), 256))
1623
- ])) : (s(), n("g", yr, [
1624
- (s(!0), n(x, null, L(dt.value, (a, o) => (s(), n("g", null, [
1625
- String(a.text).includes(`
1626
- `) ? (s(), n("text", {
1627
- key: o + "-multi",
1628
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1629
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1630
- fill: e.value.style.chart.grid.x.timeLabels.color,
1631
- transform: `
1632
- translate(
1633
- ${u.value.left + p.value * o + p.value / 2},
1634
- ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1635
- ),
1636
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1637
- `,
1638
- style: X({ cursor: q.value ? "pointer" : "default" }),
1639
- innerHTML: m(vo)({
1640
- content: String(a.text),
1641
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1642
- fill: e.value.style.chart.grid.x.timeLabels.color,
1643
- x: 0,
1644
- y: 0
1645
- }),
1646
- onClick: () => qe(a, o)
1647
- }, null, 12, br)) : (s(), n("text", {
1648
- class: "vue-data-ui-time-label",
1649
- key: o,
1650
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1651
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1652
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1653
- fill: e.value.style.chart.grid.x.timeLabels.color,
1654
- transform: `translate(${u.value.left + p.value * o + p.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1655
- style: X({ cursor: q.value ? "pointer" : "default" }),
1656
- onClick: () => qe(a, o)
1657
- }, H(a.text), 13, fr))
1658
- ]))), 256))
1659
- ]))
1660
- ], 512)) : y("", !0),
1661
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(), n("g", {
1662
- key: 16,
1663
- ref_key: "timeLabelsEls",
1664
- ref: ie
1665
- }, [
1666
- t.$slots["time-label"] ? (s(), n("g", pr, [
1667
- (s(!0), n(x, null, L(F.value, (a, o) => (s(), n("g", null, [
1668
- k(t.$slots, "time-label", Pe({ ref_for: !0 }, {
1669
- x: u.value.left - 8,
1670
- y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1671
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1672
- fill: e.value.style.chart.grid.x.timeLabels.color,
1673
- transform: null,
1674
- absoluteIndex: a.absoluteIndex,
1675
- content: a.text,
1676
- textAnchor: "end",
1677
- show: !0
1678
- }), void 0, !0)
1679
- ]))), 256))
1680
- ])) : (s(), n("g", xr, [
1681
- (s(!0), n(x, null, L(F.value, (a, o) => (s(), n("g", null, [
1682
- String(a.text).includes(`
1683
- `) ? (s(), n("text", {
1684
- key: 1,
1685
- "text-anchor": "end",
1686
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1687
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1688
- fill: e.value.style.chart.grid.y.axisLabels.color,
1689
- x: u.value.left - 8,
1690
- y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1691
- style: X({ cursor: q.value ? "pointer" : "default" }),
1692
- onClick: () => qe(a, o),
1693
- innerHTML: m(ho)({
1694
- content: String(a.text),
1695
- fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1696
- fill: e.value.style.chart.grid.y.axisLabels.color,
1697
- x: u.value.left - 8,
1698
- y: 0
1699
- })
1700
- }, null, 12, wr)) : (s(), n("text", {
1701
- key: 0,
1702
- "text-anchor": "end",
1703
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1704
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1705
- fill: e.value.style.chart.grid.y.axisLabels.color,
1706
- x: u.value.left - 8,
1707
- y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1708
- style: X({
1709
- cursor: q.value ? "pointer" : "default"
1710
- }),
1711
- onClick: () => qe(a, o)
1712
- }, H(a.text), 13, kr))
1713
- ]))), 256))
1714
- ]))
1715
- ], 512)) : y("", !0),
1716
- $.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 17 }, L(v.value.end - v.value.start, (a, o) => (s(), n("rect", {
1717
- x: u.value.left + o * p.value,
1718
- y: u.value.top,
1719
- width: p.value,
1720
- height: u.value.height < 0 ? 0 : u.value.height,
1721
- onClick: () => sa(o),
1722
- onMouseenter: () => ia(o),
1723
- onMouseleave: () => na(o),
1724
- fill: o === K.value || o === rt.value ? e.value.style.chart.highlighter.color : "transparent",
1725
- style: X({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1726
- }, null, 44, Lr))), 256)) : y("", !0),
1727
- $.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 18 }, L(v.value.end - v.value.start, (a, o) => (s(), n("rect", {
1728
- x: u.value.left,
1729
- y: u.value.top + o * p.value,
1730
- width: u.value.width < 0 ? 0 : u.value.width,
1731
- height: p.value,
1732
- onClick: () => sa(o),
1733
- onMouseenter: () => ia(o),
1734
- onMouseleave: () => na(o),
1735
- fill: o === K.value || o === rt.value ? e.value.style.chart.highlighter.color : "transparent",
1736
- style: X({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1737
- }, null, 44, Cr))), 256)) : y("", !0),
1738
- Gt.value ? (s(), n("rect", Pe({ key: 19 }, hl.value, {
1739
- "data-start": v.value.start,
1740
- "data-end": v.value.end
1741
- }), null, 16, Sr)) : y("", !0),
1742
- k(t.$slots, "svg", {
1743
- svg: {
1744
- drawingArea: u.value,
1745
- data: C.value,
1746
- isPrintingImg: m(ct) | m(vt) | Fe.value,
1747
- isPrintingSvg: Re.value
1748
- }
1749
- }, void 0, !0)
1750
- ], 14, Do)),
1751
- t.$slots.watermark ? (s(), n("div", zr, [
1752
- k(t.$slots, "watermark", B(U({ isPrinting: m(ct) || m(vt) || Fe.value || Re.value })), void 0, !0)
1753
- ])) : y("", !0),
1754
- e.value.style.chart.zoom.show && be.value && pa.value && N.value > 6 ? (s(), j(No, {
1755
- key: 4,
1756
- ref_key: "chartSlicer",
1757
- ref: pe,
1758
- allMinimaps: ml.value,
1759
- background: e.value.style.chart.zoom.color,
1760
- borderColor: e.value.style.chart.backgroundColor,
1761
- customFormat: e.value.style.chart.zoom.customFormat,
1762
- cutNullValues: !1,
1763
- forceZeroCenter: !0,
1764
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1765
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1766
- end: v.value.end,
1767
- focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
1768
- focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
1769
- fontSize: e.value.style.chart.zoom.fontSize,
1770
- immediate: !e.value.style.chart.zoom.preview.enable,
1771
- inputColor: e.value.style.chart.zoom.color,
1772
- isPreview: Gt.value,
1773
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[v.value.start] ? F.value?.[0]?.text ?? "" : "",
1774
- labelRight: e.value.style.chart.grid.x.timeLabels.values[v.value.end - 1] ? F.value?.at(-1)?.text ?? "" : "",
1775
- max: Math.max(...Ke.dataset.map((a) => a.series.length)),
1776
- min: 0,
1777
- minimap: ue.value,
1778
- minimapCompact: e.value.style.chart.zoom.minimap.compact,
1779
- minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
1780
- minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
1781
- minimapMerged: !1,
1782
- minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
1783
- minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
1784
- minimapSelectedIndex: K.value,
1785
- minimapSelectionRadius: 1,
1786
- preciseLabels: la.value.length ? la.value : ge.value,
1787
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Ke.dataset.map((a) => a.series.length)),
1788
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1789
- selectColor: e.value.style.chart.zoom.highlightColor,
1790
- selectedSeries: bl.value,
1791
- smoothMinimap: !1,
1792
- start: v.value.start,
1793
- textColor: e.value.style.chart.color,
1794
- timeLabels: ge.value,
1795
- usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
1796
- valueEnd: v.value.end,
1797
- valueStart: v.value.start,
1798
- verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
1799
- maxWidth: e.value.style.chart.zoom.maxWidth,
1800
- isCursorPointer: q.value,
1801
- additionalMinimapHeight: e.value.style.chart.zoom.minimap.additionalHeight,
1802
- handleType: e.value.style.chart.zoom.minimap.handleType,
1803
- handleIconColor: e.value.style.chart.zoom.minimap.handleIconColor,
1804
- handleBorderWidth: e.value.style.chart.zoom.minimap.handleBorderWidth,
1805
- handleBorderColor: e.value.style.chart.zoom.minimap.handleBorderColor,
1806
- handleFill: e.value.style.chart.zoom.minimap.handleFill,
1807
- handleWidth: e.value.style.chart.zoom.minimap.handleWidth,
1808
- "onUpdate:end": Rl,
1809
- "onUpdate:start": Fl,
1810
- onTrapMouse: dl,
1811
- onReset: Zt,
1812
- onFutureEnd: l[0] || (l[0] = (a) => Jt("end", a)),
1813
- onFutureStart: l[1] || (l[1] = (a) => Jt("start", a))
1814
- }, {
1815
- "reset-action": w(({ reset: a }) => [
1816
- k(t.$slots, "reset-action", B(U({ reset: a })), void 0, !0)
1817
- ]),
1818
- slotMap: w(({ width: a, height: o, unitW: c }) => [
1819
- (s(!0), n(x, null, L(C.value, (r) => (s(), n("g", {
1820
- key: r.id
1821
- }, [
1822
- (s(!0), n(x, null, L(r.xMinimap({ left: 0, unitW: c }), (b, S) => (s(), n("rect", {
1823
- key: S,
1824
- x: S === 0 ? b - c * (e.value.style.chart.bars.gapRatio / 4) : b - c / 2,
1825
- y: Math.max(0, Math.min(o, r.yMinimap({ minimapH: o })[S])),
1826
- height: r.heightMinimap({ minimapH: o })[S],
1827
- width: [0, N.value - 1].includes(S) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
1828
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${r.id})` : r.color,
1829
- stroke: e.value.style.chart.backgroundColor,
1830
- "stroke-width": 0.5,
1831
- rx: "0",
1832
- "stroke-linecap": "round",
1833
- "stroke-linejoin": "round",
1834
- style: X({
1835
- opacity: S >= E.value.start && S <= E.value.end ? 1 : 0.62
1836
- })
1837
- }, null, 12, Mr))), 128))
1838
- ]))), 128))
1839
- ]),
1840
- _: 3
1841
- }, 8, ["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"])) : y("", !0),
1842
- Ae(m(Ba), {
1843
- teleportTo: e.value.style.chart.tooltip.teleportTo,
1844
- show: $.value.showTooltip && Qe.value,
1845
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1846
- color: e.value.style.chart.tooltip.color,
1847
- fontSize: e.value.style.chart.tooltip.fontSize,
1848
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1849
- borderColor: e.value.style.chart.tooltip.borderColor,
1850
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1851
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1852
- position: e.value.style.chart.tooltip.position,
1853
- offsetY: e.value.style.chart.tooltip.offsetY,
1854
- parent: Z.value,
1855
- content: et.value,
1856
- isFullscreen: xe.value,
1857
- isCustom: m(Ra)(e.value.style.chart.tooltip.customFormat),
1858
- smooth: e.value.style.chart.tooltip.smooth,
1859
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1860
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1861
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1862
- }, {
1863
- "tooltip-before": w(() => [
1864
- k(t.$slots, "tooltip-before", B(U({ ...je.value })), void 0, !0)
1865
- ]),
1866
- "tooltip-after": w(() => [
1867
- k(t.$slots, "tooltip-after", B(U({ ...je.value })), void 0, !0)
1868
- ]),
1869
- _: 3
1870
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1871
- oe("div", {
1872
- id: `legend-bottom-${W.value}`
1873
- }, null, 8, _r),
1874
- At.value ? (s(), j(to, {
1875
- key: 5,
1876
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${W.value}` : `#legend-bottom-${W.value}`
1877
- }, [
1878
- oe("div", {
1879
- ref_key: "chartLegend",
1880
- ref: _t
1881
- }, [
1882
- e.value.style.chart.legend.show ? (s(), j(Po, {
1883
- key: 0,
1884
- legendSet: Se.value,
1885
- config: Sl.value,
1886
- isCursorPointer: q.value,
1887
- onClickMarker: l[2] || (l[2] = ({ legend: a }) => a.segregate())
1888
- }, Ct({
1889
- item: w(({ legend: a }) => [
1890
- m(he) ? y("", !0) : (s(), n("div", {
1891
- key: 0,
1892
- onClick: (o) => a.segregate(),
1893
- style: X(`opacity:${_.value.includes(a.id) ? 0.5 : 1}`)
1894
- }, H(a.name), 13, Tr))
1895
- ]),
1896
- legendToggle: w(() => [
1897
- Se.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !m(he) ? (s(), j(Fo, {
1898
- key: 0,
1899
- backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
1900
- color: e.value.style.chart.legend.selectAllToggle.color,
1901
- fontSize: e.value.style.chart.legend.fontSize,
1902
- checked: _.value.length > 0,
1903
- isCursorPointer: q.value,
1904
- onToggle: wl
1905
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : y("", !0)
1906
- ]),
1907
- _: 2
1908
- }, [
1909
- t.$slots.pattern ? {
1910
- name: "legend-pattern",
1911
- fn: w(({ legend: a, index: o }) => [
1912
- Ae($o, {
1913
- shape: a.shape,
1914
- radius: 30,
1915
- stroke: "none",
1916
- plot: { x: 30, y: 30 },
1917
- fill: `url(#pattern_${W.value}_${o})`
1918
- }, null, 8, ["shape", "fill"])
1919
- ]),
1920
- key: "0"
1921
- } : void 0
1922
- ]), 1032, ["legendSet", "config", "isCursorPointer"])) : k(t.$slots, "legend", {
1923
- key: 1,
1924
- legend: Se.value
1925
- }, void 0, !0)
1926
- ], 512)
1927
- ], 8, ["to"])) : y("", !0),
1928
- t.$slots.source ? (s(), n("div", {
1929
- key: 6,
1930
- ref_key: "source",
1931
- ref: Tt,
1932
- dir: "auto"
1933
- }, [
1934
- k(t.$slots, "source", {}, void 0, !0)
1935
- ], 512)) : y("", !0),
1936
- be.value && e.value.userOptions.buttons.table ? (s(), j(ao(ze.value.component), Pe({ key: 7 }, ze.value.props, {
1937
- ref_key: "tableUnit",
1938
- ref: ke,
1939
- onClose: ya
1940
- }), Ct({
1941
- content: w(() => [
1942
- Ae(m(Wa), {
1943
- colNames: He.value.colNames,
1944
- head: He.value.head,
1945
- body: He.value.body,
1946
- config: He.value.config,
1947
- title: e.value.table.useDialog ? "" : ze.value.title,
1948
- withCloseButton: !e.value.table.useDialog,
1949
- isCursorPointer: q.value,
1950
- onClose: ya
1951
- }, {
1952
- th: w(({ th: a }) => [
1953
- oe("div", { innerHTML: a }, null, 8, $r)
1954
- ]),
1955
- td: w(({ td: a }) => [
1956
- Ma(H(isNaN(Number(a)) ? a : m(re)({
1957
- p: e.value.style.chart.bars.dataLabels.prefix,
1958
- v: a,
1959
- s: e.value.style.chart.bars.dataLabels.suffix,
1960
- r: e.value.table.td.roundingValue
1961
- })), 1)
1962
- ]),
1963
- _: 1
1964
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"])
1965
- ]),
1966
- _: 2
1967
- }, [
1968
- e.value.table.useDialog ? {
1969
- name: "title",
1970
- fn: w(() => [
1971
- Ma(H(ze.value.title), 1)
1972
- ]),
1973
- key: "0"
1974
- } : void 0,
1975
- e.value.table.useDialog ? {
1976
- name: "actions",
1977
- fn: w(() => [
1978
- oe("button", {
1979
- tabindex: "0",
1980
- class: "vue-ui-user-options-button",
1981
- onClick: l[3] || (l[3] = (a) => yt(e.value.userOptions.callbacks.csv)),
1982
- style: X({ cursor: q.value ? "pointer" : "default" })
1983
- }, [
1984
- Ae(m(Ua), {
1985
- name: "fileCsv",
1986
- stroke: ze.value.props.color
1987
- }, null, 8, ["stroke"])
1988
- ], 4)
1989
- ]),
1990
- key: "1"
1991
- } : void 0
1992
- ]), 1040)) : y("", !0),
1993
- k(t.$slots, "skeleton", {}, () => [
1994
- m(he) ? (s(), j(ko, { key: 0 })) : y("", !0)
1995
- ], !0)
1996
- ], 46, Io));
1997
- }
1998
- }, ts = /* @__PURE__ */ Ro(Ar, [["__scopeId", "data-v-30e2e23e"]]);
1999
- export {
2000
- ts as default
2001
- };