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,1522 +0,0 @@
1
- import { useCssVars as wa, defineAsyncComponent as le, useSlots as xa, computed as d, ref as i, toRefs as _a, watch as oe, onBeforeUnmount as $a, onMounted as Re, openBlock as n, createElementBlock as u, unref as r, normalizeStyle as p, normalizeClass as Q, createBlock as H, withCtx as h, renderSlot as f, normalizeProps as O, guardReactiveProps as I, createCommentVNode as g, createSlots as be, createElementVNode as s, toDisplayString as m, createVNode as ne, Fragment as V, renderList as M, mergeProps as $t, resolveDynamicComponent as Ta, withKeys as La, createTextVNode as Tt, nextTick as me } from "vue";
2
- import { j as Sa, t as Lt, m as Pa, p as ee, $ as Xe, n as za, q as ie, o as He, K as P, s as Ue, k as ve, l as j, X as Aa, u as We, v as Na, Z as Ge, ap as Oa, a0 as Ia, a1 as Va, T as Ma, U as Fa } from "./lib-GwPnJSrY.js";
3
- import { t as Da, u as Ba } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ea } from "./useConfig-CIgyKZ6R.js";
5
- import { u as Ra, B as Xa } from "./BaseScanner-BhhkKVoj.js";
6
- import { u as Ha } from "./usePrinter-DiK5R6k-.js";
7
- import { u as Ua } from "./useSvgExport-ByUukOZt.js";
8
- import { u as je } from "./useNestedProp-BBT0mbHh.js";
9
- import { u as Wa } from "./useThemeCheck-D1ZYXUwG.js";
10
- import { u as Ga } from "./useTableResponsive-Cbx-ACcP.js";
11
- import { u as ja } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { u as Ya } from "./useChartAccessibility-9icAAmYg.js";
13
- import qa from "./img-BYYzY_QU.js";
14
- import { _ as St } from "./Shape-CSyWYgXc.js";
15
- import Ka from "./Title-BfyrP-jp.js";
16
- import Za from "./vue_ui_horizontal_bar-BEagrV0T.js";
17
- import Pt from "./Legend-1LMMsPxL.js";
18
- import Ja from "./vue-ui-accordion-BGHTqIBt.js";
19
- import { B as zt } from "./BaseLegendToggle-Y61xahI4.js";
20
- import { _ as Qa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
- const el = ["id"], tl = ["onClick"], al = ["xmlns", "viewBox"], ll = ["width", "height"], ol = ["id"], nl = ["stop-color"], ul = ["stop-color"], sl = { key: 1 }, rl = ["y", "width", "height", "fill", "rx"], il = ["x", "y", "width", "height", "fill", "rx"], vl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], cl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], dl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], hl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], pl = { class: "vue-ui-horizontal-bar-parent-label" }, fl = ["y", "height", "width", "fill"], gl = ["y", "font-size", "fill", "x", "font-weight", "innerHTML"], yl = ["y", "font-size", "fill", "x", "font-weight"], bl = { class: "vue-ui-horizontal-bar-child-label" }, ml = ["x", "y", "font-size", "font-weight", "innerHTML"], kl = { class: "vue-ui-horizontal-bar-child-label" }, Cl = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], wl = { class: "vue-ui-horizontal-bar-child-label" }, xl = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], _l = ["y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], $l = {
22
- key: 5,
23
- class: "vue-data-ui-watermark"
24
- }, Tl = ["onClick"], Ll = { style: "width:100%;padding-top: 36px;position:relative" }, Sl = { class: "vue-ui-data-table" }, Pl = { key: 0 }, zl = { style: { width: "100%" } }, Al = ["data-cell"], Nl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ol = ["data-cell"], Il = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Vl = ["data-cell"], Ml = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Fl = ["data-cell"], Dl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bl = ["data-cell"], El = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rl = ["data-cell"], Xl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Hl = ["data-cell"], Ul = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Wl = {
25
- __name: "vue-ui-horizontal-bar",
26
- props: {
27
- config: {
28
- type: Object,
29
- default() {
30
- return {};
31
- }
32
- },
33
- dataset: {
34
- type: Array,
35
- default() {
36
- return [];
37
- }
38
- }
39
- },
40
- emits: ["selectLegend", "copyAlt"],
41
- setup(At, { expose: Nt, emit: Ot }) {
42
- wa((t) => ({
43
- e04bdc8e: t.tdo
44
- }));
45
- const It = le(() => import("./Tooltip-DL3QgjZf.js")), Ye = le(() => import("./BaseIcon-CNx8Tzl5.js")), Vt = le(() => import("./PenAndPaper-DWV1FMIi.js")), Mt = le(() => import("./UserOptions-CrLqEimB.js")), Ft = le(() => import("./PackageVersion-DN9d0ME5.js")), Dt = le(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_vertical_bar: Bt } = Ea(), { isThemeValid: Et, warnInvalidTheme: Rt } = Wa(), Xt = xa(), k = At, ke = d({
46
- get() {
47
- return !!k.dataset && k.dataset.length;
48
- },
49
- set(t) {
50
- return t;
51
- }
52
- }), A = i(Sa()), Ce = i(!1), we = i(""), Ht = i(null), qe = i(0), B = i(null), Ke = i(null), xe = i(null), Ze = i(null), Je = i(null), Qe = i(0), _e = i(0), Ut = i(null), ue = i(null), $e = i(null), Wt = i(null), Te = i(null), w = i([]), Gt = i({ none: 0, asc: 1, desc: 2 }), U = i(0), ce = i(!1), se = i(0), te = i(0), Le = i(null), de = i(!1), he = i(!1), et = Ot, e = i(Ae()), Y = d(() => e.value.userOptions.useCursorPointer), jt = d(() => {
53
- const t = [
54
- { name: "", value: 6, color: "#d9d9d9" },
55
- { name: "", value: 5, color: "#d9d9d9" },
56
- { name: "", value: 4, color: "#d9d9d9" },
57
- { name: "", value: 3, color: "#d9d9d9" },
58
- { name: "", value: 2, color: "#d9d9d9" },
59
- { name: "", value: 1, color: "#d9d9d9" }
60
- ];
61
- return k.config?.skeletonDataset ?? t;
62
- }), Yt = d(() => Lt({
63
- defaultConfig: {
64
- useCssAnimation: !1,
65
- userOptions: { show: !1 },
66
- table: { show: !1 },
67
- style: {
68
- chart: {
69
- backgroundColor: "#99999930",
70
- layout: {
71
- bars: {
72
- offsetX: 110,
73
- dataLabels: {
74
- color: "transparent",
75
- value: { prefix: "", suffix: "", formatter: null }
76
- },
77
- nameLabels: { color: "transparent" }
78
- },
79
- separators: { color: "#7A7A7A" }
80
- },
81
- legend: {
82
- show: !0,
83
- backgroundColor: "transparent",
84
- color: "transparent",
85
- prefix: "",
86
- suffix: "",
87
- formatter: null
88
- },
89
- title: { color: "#1A1A1A", subtitle: { color: "#5A5A5A" } }
90
- }
91
- }
92
- },
93
- userConfig: e.value.skeletonConfig ?? {}
94
- })), { loading: pe, FINAL_DATASET: tt, manualLoading: Se } = Ra({
95
- ..._a(k),
96
- FINAL_CONFIG: e,
97
- prepareConfig: Ae,
98
- callback: () => {
99
- Promise.resolve().then(async () => {
100
- _.value.showTable = e.value.table.show, Jt();
101
- });
102
- },
103
- skeletonDataset: jt.value,
104
- skeletonConfig: Lt({
105
- defaultConfig: e.value,
106
- userConfig: Yt.value
107
- })
108
- }), { userOptionsVisible: Pe, setUserOptionsVisibility: at, keepUserOptionState: lt } = ja({ config: e.value }), { svgRef: ze } = Ya({
109
- config: e.value.style.chart.title
110
- });
111
- function Ae() {
112
- const t = je({
113
- userConfig: k.config,
114
- defaultConfig: Bt
115
- });
116
- let l = {};
117
- const a = t.theme;
118
- if (a)
119
- if (!Et.value(t))
120
- Rt(t), l = t;
121
- else {
122
- const o = je({
123
- userConfig: Za[a] || k.config,
124
- defaultConfig: t
125
- });
126
- l = {
127
- ...je({ userConfig: k.config, defaultConfig: o }),
128
- customPalette: t.customPalette.length ? t.customPalette : Pa[a] || ee
129
- };
130
- }
131
- else
132
- l = t;
133
- return k.config && Xe(k.config, "events.datapointEnter") ? l.events.datapointEnter = k.config.events.datapointEnter : l.events.datapointEnter = null, k.config && Xe(k.config, "events.datapointLeave") ? l.events.datapointLeave = k.config.events.datapointLeave : l.events.datapointLeave = null, k.config && Xe(k.config, "events.datapointClick") ? l.events.datapointClick = k.config.events.datapointClick : l.events.datapointClick = null, l;
134
- }
135
- const F = i(e.value.style.chart.width), W = i(e.value.style.chart.height), C = i(e.value.style.chart.layout.bars.gap);
136
- oe(
137
- () => k.config,
138
- (t) => {
139
- pe.value || (e.value = Ae()), Pe.value = !e.value.userOptions.showOnChartHover, Qe.value += 1, _e.value += 1, _.value.showTable = e.value.table.show, _.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", _.value.showTooltip = e.value.style.chart.tooltip.show, F.value = e.value.style.chart.width, W.value = e.value.style.chart.height, C.value = e.value.style.chart.layout.bars.gap;
140
- },
141
- { deep: !0 }
142
- ), oe(
143
- () => k.dataset,
144
- (t) => {
145
- Array.isArray(t) && t.length > 0 && (Se.value = !1);
146
- },
147
- { deep: !0 }
148
- );
149
- const { isPrinting: Ne, isImaging: Oe, generatePdf: ot, generateImage: nt } = Ha({
150
- elementId: `vue-ui-vertical-bar_${A.value}`,
151
- fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
152
- options: e.value.userOptions.print
153
- }), qt = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), ut = d(() => za(e.value.customPalette)), st = i(null), Kt = d(() => e.value.table.responsiveBreakpoint), fe = d(() => !!e.value.debug), Zt = i(0), G = i(null), q = i(null);
154
- function Jt() {
155
- if (B.value && (He(k.dataset) && (ie({
156
- componentName: "VueUiVerticalBar",
157
- type: "dataset",
158
- debug: fe.value
159
- }), ke.value = !1, Se.value = !0), He(k.dataset) || (Se.value = e.value.loading), e.value.responsive)) {
160
- const t = Da(() => {
161
- const { width: l, height: a } = Ba({
162
- chart: B.value,
163
- title: e.value.style.chart.title.text ? Ke.value : null,
164
- legend: e.value.style.chart.legend.show ? xe.value : null,
165
- source: Ze.value,
166
- noTitle: Je.value
167
- });
168
- Zt.value = a / 3, requestAnimationFrame(async () => {
169
- W.value = a, F.value = l;
170
- });
171
- });
172
- G.value && (q.value && G.value.unobserve(q.value), G.value.disconnect()), G.value = new ResizeObserver(t), me(() => {
173
- q.value = B.value?.parentNode, q.value && G.value.observe(q.value);
174
- });
175
- }
176
- }
177
- $a(() => {
178
- G.value && (q.value && G.value.unobserve(q.value), G.value.disconnect());
179
- });
180
- const _ = i({
181
- showTable: e.value.table.show,
182
- sortDesc: e.value.style.chart.layout.bars.sort === "desc",
183
- showTooltip: e.value.style.chart.tooltip.show
184
- }), rt = d(() => _.value.sortDesc), $ = d(() => (tt.value.forEach((t, l) => {
185
- !t.value && !t.children && ie({
186
- componentName: "VueUiVerticalBar",
187
- type: "datasetAttributeEmpty",
188
- property: `value (index ${l})`,
189
- debug: fe.value
190
- }), t.children && (He(t.children) ? ie({
191
- componentName: "VueUiVerticalBar",
192
- type: "datasetAttributeEmpty",
193
- property: `children (index ${l})`,
194
- debug: fe.value
195
- }) : t.children.forEach((a, o) => {
196
- [null, void 0].includes(a.name) && ie({
197
- componentName: "VueUiVerticalBar",
198
- type: "datasetSerieAttribute",
199
- property: "name",
200
- key: "children",
201
- index: o,
202
- debug: fe.value
203
- });
204
- }));
205
- }), tt.value.map((t, l) => {
206
- const a = `vertical_parent_${l}_${A.value}`, o = t.children && t.children.length > 0, y = P(
207
- t.value ? t.value : o ? t.children.map((b) => b.value || 0).reduce((b, N) => b + N, 0) : 0
208
- ), x = y >= 0 ? 1 : -1;
209
- return {
210
- ...t,
211
- id: a,
212
- absoluteIndex: l,
213
- shape: "square",
214
- opacity: w.value.includes(a) ? 0.5 : 1,
215
- value: Math.abs(y),
216
- sign: x,
217
- hasChildren: o,
218
- isChild: !1,
219
- segregate: () => K(a),
220
- isSegregated: w.value.includes(a),
221
- color: Ue(t.color) || ut.value[l] || ee[l] || ee[l % ee.length],
222
- children: !t.children || !t.children.length ? [] : t.children.toSorted(
223
- ce.value ? () => 0 : (b, N) => rt.value ? N.value - b.value : b.value - N.value
224
- ).map((b, N) => ({
225
- ...b,
226
- value: P(Math.abs(b.value)),
227
- absoluteIndex: l,
228
- sign: b.value >= 0 ? 1 : -1,
229
- isChild: !0,
230
- parentId: a,
231
- parentName: t.name,
232
- parentValue: y,
233
- parentSign: x,
234
- id: `vertical_child_${l}_${N}_${A.value}`,
235
- childIndex: N,
236
- color: Ue(b.color) || Ue(t.color) || ut.value[l] || ee[l] || ee[l % ee.length]
237
- })).map((b, N) => ({
238
- ...b,
239
- isFirstChild: N === 0,
240
- isLastChild: N === t.children.length - 1
241
- }))
242
- };
243
- }).toSorted(
244
- ce.value ? () => 0 : (t, l) => rt.value ? l.value - t.value : t.value - l.value
245
- ))), R = d(() => $.value.filter(
246
- (t) => !w.value.includes(t.id)
247
- )), T = d(() => R.value.flatMap((t) => t.hasChildren ? t.children : t)), Qt = d(() => $.value.flatMap((t) => t.hasChildren ? t.children : t)), it = d(() => R.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0)), vt = d(() => ({
248
- cy: "vertical-bar-div-legend",
249
- backgroundColor: e.value.style.chart.legend.backgroundColor,
250
- color: e.value.style.chart.legend.color,
251
- fontSize: e.value.style.chart.legend.fontSize,
252
- paddingBottom: 12,
253
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
254
- })), L = d(() => e.value.style.chart.layout.bars.parentLabels.show ? e.value.style.chart.layout.bars.parentLabels.fontSize * 3 + e.value.style.chart.layout.bars.parentLabels.paddingBottom : 0), S = d(() => {
255
- const t = [];
256
- let l = 0;
257
- return T.value.forEach((a, o) => {
258
- a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show && (l += 1), t[o] = l;
259
- }), t;
260
- }), c = d(() => {
261
- const l = Math.max(0, ...S.value) * L.value;
262
- return (W.value - 24 - (it.value - 1) * C.value - l) / it.value;
263
- }), X = d(() => ({
264
- width: F.value,
265
- height: W.value,
266
- padding: {
267
- top: 12,
268
- left: 128 + e.value.style.chart.layout.bars.offsetX,
269
- right: 64 + e.value.style.chart.layout.bars.paddingRight,
270
- bottom: 12
271
- }
272
- })), Ie = i(0);
273
- function ct() {
274
- me(() => {
275
- if (!Te.value) {
276
- Ie.value = 0;
277
- return;
278
- }
279
- const l = Array.from(Te.value.querySelectorAll("text")).reduce((a, o) => {
280
- const y = o.getBBox?.().width ?? o.getComputedTextLength();
281
- return y > a ? y : a;
282
- }, 0);
283
- Ie.value = l + 12;
284
- });
285
- }
286
- oe(
287
- () => [
288
- T.value,
289
- F.value,
290
- W.value,
291
- e.value.style.chart.layout.bars.nameLabels,
292
- e.value.style.chart.layout.bars.offsetX
293
- ],
294
- () => ct(),
295
- { deep: !0 }
296
- ), Re(() => {
297
- ct();
298
- });
299
- function re() {
300
- me(() => {
301
- se.value = 0, te.value = 0, requestAnimationFrame(() => {
302
- if (!Le.value) {
303
- se.value = 0, te.value = 0;
304
- return;
305
- }
306
- const t = Array.from(
307
- Le.value.querySelectorAll("text")
308
- );
309
- if (!t.length) {
310
- se.value = 0, te.value = 0;
311
- return;
312
- }
313
- let l = 1 / 0, a = 0;
314
- t.forEach((Ca) => {
315
- const Ee = Ca.getBBox(), xt = Ee.x, _t = Ee.x + Ee.width;
316
- xt < l && (l = xt), _t > a && (a = _t);
317
- });
318
- const o = 0, y = F.value, x = 24, b = Math.max(0, o - l + x), N = Math.max(0, a - y + x);
319
- te.value = b, se.value = N;
320
- });
321
- });
322
- }
323
- oe(w, () => re(), { deep: !0 }), oe(
324
- () => [T.value, F.value, W.value],
325
- () => re(),
326
- { deep: !0 }
327
- ), Re(() => re());
328
- const v = d(() => {
329
- const t = Ie.value + Math.abs(e.value.style.chart.layout.bars.nameLabels.offsetX) + te.value + e.value.style.chart.layout.bars.offsetX, l = X.value.width - X.value.padding.right, a = Math.max(0, l - t - se.value - te.value - e.value.style.chart.layout.bars.offsetX);
330
- return {
331
- top: X.value.padding.top,
332
- bottom: X.value.padding.top + X.value.height,
333
- left: t,
334
- right: l,
335
- width: a,
336
- fullHeight: X.value.padding.top + X.value.padding.bottom + X.value.height
337
- };
338
- });
339
- function dt() {
340
- w.value.length ? w.value = [] : $.value.forEach((t) => {
341
- w.value.push(t.id);
342
- }), re();
343
- }
344
- async function K(t) {
345
- if (w.value.includes(t))
346
- w.value = w.value.filter((l) => l !== t);
347
- else {
348
- if (w.value.length === $.value.length - 1) return;
349
- w.value.push(t);
350
- }
351
- et("selectLegend", R.value), re();
352
- }
353
- function ht(t) {
354
- if (!$.value.length)
355
- return e.value.debug && console.warn("VueUiHorizontalBar - There are no series to show."), null;
356
- const l = $.value.find((a) => a.name === t);
357
- return l || (e.value.debug && console.warn(`VueUiHorizontalBar - Series name not found "${t}"`), null);
358
- }
359
- function ea(t) {
360
- const l = ht(t);
361
- l !== null && w.value.includes(l.id) && K(l.id);
362
- }
363
- function ta(t) {
364
- const l = ht(t);
365
- l !== null && (w.value.includes(l.id) || K(l.id));
366
- }
367
- const E = d(() => R.value.map((t) => Math.abs(t.value)).reduce((t, l) => t + l, 0));
368
- function pt(t, l = !1, a = 0) {
369
- return l ? j({
370
- v: P(Math.abs(t) / E.value * 100),
371
- s: "%",
372
- r: a
373
- }) : Math.abs(t) / E.value;
374
- }
375
- const Z = d(() => T.value.map((t) => t.sign).includes(-1)), aa = d(() => Math.max(
376
- ...R.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((l) => l.value)) : t.value)
377
- ));
378
- function z(t) {
379
- const l = t / aa.value;
380
- return P(v.value.width / (Z.value ? 2 : 1) * l);
381
- }
382
- function la(t) {
383
- return z(t) + v.value.left;
384
- }
385
- function ae(t, l) {
386
- const a = R.value.find((b) => b.id === t.parentId);
387
- return {
388
- y: v.value.top + (C.value + c.value) * l + S.value[l] * L.value - L.value + e.value.style.chart.layout.bars.parentLabels.fontSize,
389
- name: a.name,
390
- value: [void 0, NaN, null].includes(a.value) ? "" : a.sign === 1 ? a.value : -a.value,
391
- percentageToTotal: isNaN(a.value / E.value) ? "" : pt(
392
- a.value,
393
- !0,
394
- e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage
395
- ),
396
- sign: a.sign
397
- };
398
- }
399
- function oa() {
400
- return R.value;
401
- }
402
- function ft(t, l) {
403
- return ae(t, l).name;
404
- }
405
- function na(t, l) {
406
- const a = ae(t, l);
407
- return gt(a.value, a, l, t.parentSign || t.sign);
408
- }
409
- const Ve = i(null), Me = i(null);
410
- function ua({ datapoint: t, seriesIndex: l }) {
411
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
412
- }
413
- function sa({ datapoint: t, seriesIndex: l }) {
414
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l }), Ht.value = null, Ce.value = !1, Ve.value = null;
415
- }
416
- function ra(t, l) {
417
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: t, seriesIndex: l }), Me.value = {
418
- datapoint: t,
419
- seriesIndex: l,
420
- series: $.value,
421
- config: e.value
422
- }, Ce.value = !0, Ve.value = t.id;
423
- let a = "";
424
- const o = t.isChild ? t.parentName : t.name, y = t.isChild ? t.name : "", x = e.value.style.chart.tooltip.customFormat;
425
- Ma(x) && Fa(
426
- () => x({
427
- datapoint: t,
428
- series: $.value,
429
- config: e.value,
430
- seriesIndex: l
431
- })
432
- ) ? we.value = x({
433
- datapoint: t,
434
- series: $.value,
435
- config: e.value,
436
- seriesIndex: l
437
- }) : (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
438
- <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${t.color}"/>${Xt.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${A.value}_${t.absoluteIndex})"/>` : ""}</svg> ${o}</div>
439
- ${y ? `<div>${y}</div>` : ""}
440
- </div>`, e.value.style.chart.tooltip.showValue && (a += `<div>${e.value.translations.value}: <b>${ve(
441
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
442
- t.sign === 1 ? t.value : -t.value,
443
- j({
444
- p: e.value.style.chart.tooltip.prefix,
445
- v: t.sign === 1 ? t.value : -t.value,
446
- s: e.value.style.chart.tooltip.suffix,
447
- r: e.value.style.chart.tooltip.roundingValue
448
- }),
449
- { datapoint: t, seriesIndex: l }
450
- )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (a += `<div>${e.value.translations.percentageToTotal} : <b>${j({
451
- v: Math.abs(t.value) / E.value * 100,
452
- s: "%",
453
- r: e.value.style.chart.tooltip.roundingPercentage
454
- })}</b></div>`, t.isChild && (a += `<div>${e.value.translations.percentageToSerie}: <b>${j({
455
- v: Math.abs(t.value) / Math.abs(t.parentValue) * 100,
456
- s: "%",
457
- r: e.value.style.chart.tooltip.roundingPercentage
458
- })}</b></div>`)), we.value = `<div style="text-align:left">${a}</div>`);
459
- }
460
- function gt(t, l, a, o) {
461
- if (!e.value.style.chart.layout.bars.dataLabels.value.show)
462
- return "";
463
- const y = ve(
464
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
465
- P(o === -1 && t >= 0 ? -t : t),
466
- j({
467
- p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
468
- v: P(o === -1 && t >= 0 ? -t : t),
469
- s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
470
- r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
471
- }),
472
- { datapoint: l, seriesIndex: a }
473
- ), x = `(${pt(
474
- t,
475
- !0,
476
- e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage
477
- )})`;
478
- return `${y}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${x}` : ""}`;
479
- }
480
- const D = d(() => {
481
- const t = [
482
- e.value.translations.parentName,
483
- e.value.translations.value,
484
- e.value.translations.percentageToTotal,
485
- e.value.translations.childName,
486
- e.value.translations.value,
487
- e.value.translations.percentageToSerie,
488
- e.value.translations.percentageToTotal
489
- ], l = T.value.map((a) => a.isChild ? a.isFirstChild ? {
490
- color: a.color,
491
- parentName: a.parentName,
492
- parentValue: a.parentValue,
493
- percentageToTotal: a.parentValue / E.value,
494
- childName: a.name,
495
- childValue: a.sign === 1 ? a.value : -a.value,
496
- childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
497
- childPercentageToTotal: Math.abs(a.value) / E.value
498
- } : {
499
- color: "",
500
- parentName: "",
501
- parentValue: "",
502
- percentageToTotal: "",
503
- childName: a.name,
504
- childValue: a.sign === 1 ? a.value : -a.value,
505
- childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
506
- childPercentageToTotal: Math.abs(a.value) / E.value
507
- } : {
508
- color: a.color,
509
- parentName: a.name,
510
- parentValue: a.sign === 1 ? a.value : -a.value,
511
- percentageToTotal: Math.abs(a.value) / E.value,
512
- childName: "",
513
- childValue: "",
514
- childPercentageToParent: "",
515
- childPercentageToTotal: ""
516
- });
517
- return { head: t, body: l };
518
- });
519
- function Fe(t = null) {
520
- const l = [
521
- [e.value.style.chart.title.text],
522
- [e.value.style.chart.title.subtitle.text],
523
- [""]
524
- ], a = D.value.head, o = D.value.body.map((b) => [
525
- b.parentName,
526
- b.parentValue,
527
- b.percentageToTotal,
528
- b.childName,
529
- b.childValue,
530
- b.childPercentageToParent,
531
- b.childPercentageToTotal
532
- ]), y = l.concat([a]).concat(o), x = Ia(y);
533
- t ? t(x) : Va({
534
- csvContent: x,
535
- title: e.value.style.chart.title.text || "vue-ui-vertical-bar"
536
- });
537
- }
538
- const J = i(!1);
539
- function yt(t) {
540
- J.value = t, qe.value += 1;
541
- }
542
- function bt() {
543
- _.value.showTable = !_.value.showTable;
544
- }
545
- Re(() => {
546
- ["none", "asc", "desc"].includes(
547
- e.value.style.chart.layout.bars.sort
548
- ) || ie({
549
- componentName: "VueUiVerticalBar",
550
- type: "attributeWrongValue",
551
- property: "style.chart.layout.bars.sort",
552
- key: e.value.style.chart.layout.bars.sort
553
- }), U.value = Gt.value[e.value.style.chart.layout.bars.sort], _.value.sortDesc = U.value === 2, ce.value = U.value === 0;
554
- });
555
- function ia() {
556
- U.value += 1, U.value > 2 && (U.value = 0);
557
- }
558
- function mt() {
559
- ia(), _.value.sortDesc = U.value === 2, ce.value = U.value === 0;
560
- }
561
- function kt() {
562
- _.value.showTooltip = !_.value.showTooltip;
563
- }
564
- const ge = i(!1);
565
- function De() {
566
- ge.value = !ge.value;
567
- }
568
- async function va({ scale: t = 2 } = {}) {
569
- if (!B.value) return;
570
- const { width: l, height: a } = B.value.getBoundingClientRect(), o = l / a, { imageUri: y, base64: x } = await qa({
571
- domElement: B.value,
572
- base64: !0,
573
- img: !0,
574
- scale: t
575
- });
576
- return {
577
- imageUri: y,
578
- base64: x,
579
- title: e.value.style.chart.title.text,
580
- width: l,
581
- height: a,
582
- aspectRatio: o
583
- };
584
- }
585
- const ye = d(() => {
586
- const t = e.value.table.useDialog && !e.value.table.show, l = _.value.showTable;
587
- return {
588
- component: t ? Dt : Ja,
589
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
590
- props: t ? {
591
- backgroundColor: e.value.table.th.backgroundColor,
592
- color: e.value.table.th.color,
593
- headerColor: e.value.table.th.color,
594
- headerBg: e.value.table.th.backgroundColor,
595
- isFullscreen: J.value,
596
- fullscreenParent: B.value,
597
- forcedWidth: Math.min(800, window.innerWidth * 0.8),
598
- isCursorPointer: Y.value
599
- } : {
600
- hideDetails: !0,
601
- config: {
602
- open: l,
603
- maxHeight: 1e4,
604
- body: {
605
- backgroundColor: e.value.style.chart.backgroundColor,
606
- color: e.value.style.chart.color
607
- },
608
- head: {
609
- backgroundColor: e.value.style.chart.backgroundColor,
610
- color: e.value.style.chart.color
611
- }
612
- }
613
- }
614
- };
615
- });
616
- oe(
617
- () => _.value.showTable,
618
- (t) => {
619
- e.value.table.show || (t && e.value.table.useDialog && ue.value ? ue.value.open() : "close" in ue.value && ue.value.close());
620
- }
621
- );
622
- const { isResponsive: ca } = Ga(st, Kt);
623
- function Be() {
624
- _.value.showTable = !1, $e.value && $e.value.setTableIconState(!1);
625
- }
626
- const da = d(() => $.value.map((t, l) => ({
627
- ...t,
628
- shape: "square",
629
- display: `${t.name}: ${ve(
630
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
631
- t.value,
632
- j({
633
- p: e.value.style.chart.legend.prefix,
634
- v: t.value,
635
- s: e.value.style.chart.legend.suffix,
636
- r: e.value.style.chart.legend.roundingValue
637
- }),
638
- { datapoint: t, seriesIndex: l }
639
- )}`
640
- }))), ha = d(() => e.value.style.chart.backgroundColor), pa = d(() => e.value.style.chart.legend), fa = d(() => e.value.style.chart.title), ga = d(() => da.value.map((t) => ({
641
- ...t,
642
- name: t.display
643
- }))), { exportSvg: ya, getSvg: ba } = Ua({
644
- svg: ze,
645
- title: fa,
646
- legend: pa,
647
- legendItems: ga,
648
- backgroundColor: ha
649
- });
650
- async function Ct({ isCb: t }) {
651
- he.value = !0, await me();
652
- try {
653
- if (t) {
654
- const { blob: l, url: a, text: o, dataUrl: y } = await ba();
655
- await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: l, url: a, text: o, dataUrl: y }));
656
- } else
657
- await Promise.resolve(ya());
658
- } finally {
659
- he.value = !1;
660
- }
661
- }
662
- function ma(t) {
663
- if (t?.stage === "start") {
664
- de.value = !0;
665
- return;
666
- }
667
- if (t?.stage === "end") {
668
- de.value = !1;
669
- return;
670
- }
671
- nt();
672
- }
673
- function ka() {
674
- console.warn("[autoSize]: this legacy method can be safely removed as it has no impact.");
675
- }
676
- async function wt() {
677
- if (et("copyAlt", {
678
- config: e.value,
679
- dataset: R.value
680
- }), !e.value.userOptions.callbacks.altCopy) {
681
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
682
- return;
683
- }
684
- await Promise.resolve(e.value.userOptions.callbacks.altCopy({
685
- config: e.value,
686
- dataset: R.value
687
- }));
688
- }
689
- return Nt({
690
- autoSize: ka,
691
- getData: oa,
692
- getImage: va,
693
- generatePdf: ot,
694
- generateCsv: Fe,
695
- generateImage: nt,
696
- generateSvg: Ct,
697
- hideSeries: ta,
698
- showSeries: ea,
699
- toggleTable: bt,
700
- toggleSort: mt,
701
- toggleTooltip: kt,
702
- toggleAnnotator: De,
703
- toggleFullscreen: yt,
704
- copyAlt: wt
705
- }), (t, l) => (n(), u("div", {
706
- class: Q(`vue-data-ui-component vue-ui-vertical-bar ${J.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"} ${e.value.responsive ? "vue-ui-vertical-bar-autosize" : ""}`),
707
- ref_key: "verticalBarChart",
708
- ref: B,
709
- id: `vue-ui-vertical-bar_${A.value}`,
710
- style: p(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};height:100%`),
711
- onMouseenter: l[3] || (l[3] = () => r(at)(!0)),
712
- onMouseleave: l[4] || (l[4] = () => r(at)(!1))
713
- }, [
714
- e.value.userOptions.buttons.annotator ? (n(), H(r(Vt), {
715
- key: 0,
716
- svgRef: r(ze),
717
- backgroundColor: e.value.style.chart.backgroundColor,
718
- color: e.value.style.chart.color,
719
- active: ge.value,
720
- isCursorPointer: Y.value,
721
- onClose: De
722
- }, {
723
- "annotator-action-close": h(() => [
724
- f(t.$slots, "annotator-action-close", {}, void 0, !0)
725
- ]),
726
- "annotator-action-color": h(({ color: a }) => [
727
- f(t.$slots, "annotator-action-color", O(I({ color: a })), void 0, !0)
728
- ]),
729
- "annotator-action-draw": h(({ mode: a }) => [
730
- f(t.$slots, "annotator-action-draw", O(I({ mode: a })), void 0, !0)
731
- ]),
732
- "annotator-action-undo": h(({ disabled: a }) => [
733
- f(t.$slots, "annotator-action-undo", O(I({ disabled: a })), void 0, !0)
734
- ]),
735
- "annotator-action-redo": h(({ disabled: a }) => [
736
- f(t.$slots, "annotator-action-redo", O(I({ disabled: a })), void 0, !0)
737
- ]),
738
- "annotator-action-delete": h(({ disabled: a }) => [
739
- f(t.$slots, "annotator-action-delete", O(I({ disabled: a })), void 0, !0)
740
- ]),
741
- _: 3
742
- }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : g("", !0),
743
- qt.value ? (n(), u("div", {
744
- key: 1,
745
- ref_key: "noTitle",
746
- ref: Je,
747
- class: "vue-data-ui-no-title-space",
748
- style: "height:36px; width: 100%;background:transparent"
749
- }, null, 512)) : g("", !0),
750
- e.value.style.chart.title.text ? (n(), u("div", {
751
- key: 2,
752
- ref_key: "chartTitle",
753
- ref: Ke,
754
- style: "width:100%;background:transparent;padding-bottom:12px"
755
- }, [
756
- (n(), H(Ka, {
757
- key: `title_${Qe.value}`,
758
- config: {
759
- title: {
760
- cy: "vertical-bar-div-title",
761
- ...e.value.style.chart.title
762
- },
763
- subtitle: {
764
- cy: "vertical-bar-div-subtitle",
765
- ...e.value.style.chart.title.subtitle
766
- }
767
- }
768
- }, null, 8, ["config"]))
769
- ], 512)) : g("", !0),
770
- e.value.userOptions.show && ke.value && (r(lt) || r(Pe)) ? (n(), H(r(Mt), {
771
- ref_key: "userOptionsRef",
772
- ref: $e,
773
- backgroundColor: e.value.style.chart.backgroundColor,
774
- color: e.value.style.chart.color,
775
- key: `user_options_${qe.value}`,
776
- isImaging: r(Oe),
777
- isPrinting: r(Ne),
778
- uid: A.value,
779
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
780
- hasPdf: e.value.userOptions.buttons.pdf,
781
- hasImg: e.value.userOptions.buttons.img,
782
- hasSvg: e.value.userOptions.buttons.svg,
783
- hasXls: e.value.userOptions.buttons.csv,
784
- hasTable: e.value.userOptions.buttons.table,
785
- hasSort: e.value.userOptions.buttons.sort,
786
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
787
- hasAltCopy: e.value.userOptions.buttons.altCopy,
788
- isFullscreen: J.value,
789
- isTooltip: _.value.showTooltip,
790
- titles: { ...e.value.userOptions.buttonTitles },
791
- chartElement: B.value,
792
- position: e.value.userOptions.position,
793
- hasAnnotator: e.value.userOptions.buttons.annotator,
794
- isAnnotation: ge.value,
795
- callbacks: e.value.userOptions.callbacks,
796
- printScale: e.value.userOptions.print.scale,
797
- tableDialog: e.value.table.useDialog,
798
- isCursorPointer: Y.value,
799
- onToggleFullscreen: yt,
800
- onGeneratePdf: r(ot),
801
- onGenerateCsv: Fe,
802
- onGenerateImage: ma,
803
- onGenerateSvg: Ct,
804
- onToggleTable: bt,
805
- onToggleSort: mt,
806
- onToggleTooltip: kt,
807
- onToggleAnnotator: De,
808
- onCopyAlt: wt,
809
- style: p({
810
- visibility: r(lt) ? r(Pe) ? "visible" : "hidden" : "visible"
811
- })
812
- }, be({ _: 2 }, [
813
- t.$slots.menuIcon ? {
814
- name: "menuIcon",
815
- fn: h(({ isOpen: a, color: o }) => [
816
- f(t.$slots, "menuIcon", O(I({ isOpen: a, color: o })), void 0, !0)
817
- ]),
818
- key: "0"
819
- } : void 0,
820
- t.$slots.optionTooltip ? {
821
- name: "optionTooltip",
822
- fn: h(() => [
823
- f(t.$slots, "optionTooltip", {}, void 0, !0)
824
- ]),
825
- key: "1"
826
- } : void 0,
827
- t.$slots.optionPdf ? {
828
- name: "optionPdf",
829
- fn: h(() => [
830
- f(t.$slots, "optionPdf", {}, void 0, !0)
831
- ]),
832
- key: "2"
833
- } : void 0,
834
- t.$slots.optionCsv ? {
835
- name: "optionCsv",
836
- fn: h(() => [
837
- f(t.$slots, "optionCsv", {}, void 0, !0)
838
- ]),
839
- key: "3"
840
- } : void 0,
841
- t.$slots.optionImg ? {
842
- name: "optionImg",
843
- fn: h(() => [
844
- f(t.$slots, "optionImg", {}, void 0, !0)
845
- ]),
846
- key: "4"
847
- } : void 0,
848
- t.$slots.optionSvg ? {
849
- name: "optionSvg",
850
- fn: h(() => [
851
- f(t.$slots, "optionSvg", {}, void 0, !0)
852
- ]),
853
- key: "5"
854
- } : void 0,
855
- t.$slots.optionTable ? {
856
- name: "optionTable",
857
- fn: h(() => [
858
- f(t.$slots, "optionTable", {}, void 0, !0)
859
- ]),
860
- key: "6"
861
- } : void 0,
862
- t.$slots.optionLabels ? {
863
- name: "optionLabels",
864
- fn: h(() => [
865
- f(t.$slots, "optionLabels", {}, void 0, !0)
866
- ]),
867
- key: "7"
868
- } : void 0,
869
- t.$slots.optionSort ? {
870
- name: "optionSort",
871
- fn: h(() => [
872
- f(t.$slots, "optionSort", {}, void 0, !0)
873
- ]),
874
- key: "8"
875
- } : void 0,
876
- t.$slots.optionFullscreen ? {
877
- name: "optionFullscreen",
878
- fn: h(({ toggleFullscreen: a, isFullscreen: o }) => [
879
- f(t.$slots, "optionFullscreen", O(I({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
880
- ]),
881
- key: "9"
882
- } : void 0,
883
- t.$slots.optionAnnotator ? {
884
- name: "optionAnnotator",
885
- fn: h(({ toggleAnnotator: a, isAnnotator: o }) => [
886
- f(t.$slots, "optionAnnotator", O(I({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
887
- ]),
888
- key: "10"
889
- } : void 0,
890
- t.$slots.optionAltCopy ? {
891
- name: "optionAltCopy",
892
- fn: h(({ altCopy: a }) => [
893
- f(t.$slots, "optionAltCopy", O(I({ altCopy: a })), void 0, !0)
894
- ]),
895
- key: "11"
896
- } : void 0
897
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : g("", !0),
898
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (n(), u("div", {
899
- key: 4,
900
- ref_key: "chartLegend",
901
- ref: xe
902
- }, [
903
- (n(), H(Pt, {
904
- key: `legend_top_${_e.value}`,
905
- legendSet: $.value,
906
- config: vt.value,
907
- onClickMarker: l[0] || (l[0] = ({ legend: a }) => K(a.id))
908
- }, be({
909
- item: h(({ legend: a, index: o }) => [
910
- s("div", {
911
- onClick: (y) => K(a.id),
912
- style: p(`opacity:${w.value.includes(a.id) ? 0.5 : 1}`)
913
- }, m(a.name) + ": " + m(r(ve)(
914
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
915
- a.value,
916
- r(j)({
917
- p: e.value.style.chart.legend.prefix,
918
- v: a.value,
919
- s: e.value.style.chart.legend.suffix,
920
- r: e.value.style.chart.legend.roundingValue
921
- }),
922
- { datapoint: a, seriesIndex: o }
923
- )), 13, tl)
924
- ]),
925
- legendToggle: h(() => [
926
- $.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !r(pe) ? (n(), H(zt, {
927
- key: 0,
928
- backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
929
- color: e.value.style.chart.legend.selectAllToggle.color,
930
- fontSize: e.value.style.chart.legend.fontSize,
931
- checked: w.value.length > 0,
932
- onToggle: dt
933
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked"])) : g("", !0)
934
- ]),
935
- _: 2
936
- }, [
937
- t.$slots.pattern ? {
938
- name: "legend-pattern",
939
- fn: h(({ legend: a, index: o }) => [
940
- ne(St, {
941
- shape: a.shape,
942
- radius: 30,
943
- stroke: "none",
944
- plot: { x: 30, y: 30 },
945
- fill: `url(#pattern_${A.value}_${o})`
946
- }, null, 8, ["shape", "fill"])
947
- ]),
948
- key: "0"
949
- } : void 0
950
- ]), 1032, ["legendSet", "config"]))
951
- ], 512)) : g("", !0),
952
- (n(), u("svg", {
953
- ref_key: "svgRef",
954
- ref: ze,
955
- xmlns: r(Aa),
956
- class: Q({
957
- "vue-data-ui-fullscreen--on": J.value,
958
- "vue-data-ui-fulscreen--off": !J.value
959
- }),
960
- viewBox: `0 0 ${F.value} ${W.value}`,
961
- style: p(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
962
- }, [
963
- s("g", {
964
- ref_key: "G",
965
- ref: Ut,
966
- class: "vue-data-ui-g"
967
- }, [
968
- ne(r(Ft)),
969
- t.$slots["chart-background"] ? (n(), u("foreignObject", {
970
- key: 0,
971
- x: 0,
972
- y: 0,
973
- width: F.value,
974
- height: W.value,
975
- style: {
976
- pointerEvents: "none"
977
- }
978
- }, [
979
- f(t.$slots, "chart-background", {}, void 0, !0)
980
- ], 8, ll)) : g("", !0),
981
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("linearGradient", {
982
- x1: "0%",
983
- y1: "0%",
984
- x2: "100%",
985
- y2: "0%",
986
- id: `vertical_bar_gradient_${A.value}_${o}`
987
- }, [
988
- s("stop", {
989
- offset: "0%",
990
- "stop-color": a.color
991
- }, null, 8, nl),
992
- s("stop", {
993
- offset: "100%",
994
- "stop-color": r(We)(
995
- r(Na)(a.color, 0.03),
996
- 100 - e.value.style.chart.layout.bars.gradientIntensity
997
- )
998
- }, null, 8, ul)
999
- ], 8, ol))), 256)),
1000
- t.$slots.pattern ? (n(), u("g", sl, [
1001
- (n(!0), u(V, null, M(T.value, (a) => (n(), u("defs", null, [
1002
- f(t.$slots, "pattern", $t({ ref_for: !0 }, {
1003
- seriesIndex: a.absoluteIndex,
1004
- patternId: `pattern_${A.value}_${a.absoluteIndex}`
1005
- }), void 0, !0)
1006
- ]))), 256))
1007
- ])) : g("", !0),
1008
- e.value.style.chart.layout.bars.rowColor ? (n(!0), u(V, { key: 2 }, M(T.value, (a, o) => (n(), u("g", null, [
1009
- s("rect", {
1010
- x: 0,
1011
- y: v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1012
- width: F.value,
1013
- height: c.value <= 0 ? 1e-4 : c.value,
1014
- fill: e.value.style.chart.layout.bars.rowColor,
1015
- rx: e.value.style.chart.layout.bars.rowRadius,
1016
- style: { pointerEvents: "none" }
1017
- }, null, 8, rl)
1018
- ]))), 256)) : g("", !0),
1019
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", null, [
1020
- s("rect", {
1021
- x: r(P)(
1022
- Z.value ? v.value.left + v.value.width / 2 - (a.sign === 1 ? 0 : z(a.value) <= 0 ? 1e-4 : z(a.value)) : v.value.left
1023
- ),
1024
- y: v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1025
- width: r(P)(
1026
- z(a.value) <= 0 ? 1e-4 : z(a.value)
1027
- ),
1028
- height: c.value <= 0 ? 1e-4 : c.value,
1029
- fill: e.value.style.chart.layout.bars.underlayerColor,
1030
- rx: e.value.style.chart.layout.bars.borderRadius,
1031
- class: Q({ animated: e.value.useCssAnimation })
1032
- }, null, 10, il)
1033
- ]))), 256)),
1034
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", null, [
1035
- s("rect", {
1036
- x: r(P)(
1037
- Z.value ? v.value.left + v.value.width / 2 - (a.sign === 1 ? 0 : z(a.value) <= 0 ? 1e-4 : z(a.value)) : v.value.left
1038
- ),
1039
- y: v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1040
- width: r(P)(
1041
- z(a.value) <= 0 ? 1e-4 : z(a.value)
1042
- ),
1043
- height: c.value <= 0 ? 1e-4 : c.value,
1044
- fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${A.value}_${o})` : r(We)(
1045
- a.color,
1046
- e.value.style.chart.layout.bars.fillOpacity
1047
- ),
1048
- rx: e.value.style.chart.layout.bars.borderRadius,
1049
- stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
1050
- "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
1051
- class: Q({ animated: e.value.useCssAnimation })
1052
- }, null, 10, vl),
1053
- t.$slots.pattern ? (n(), u("rect", {
1054
- key: 0,
1055
- x: r(P)(
1056
- Z.value ? v.value.left + v.value.width / 2 - (a.sign === 1 ? 0 : z(a.value) <= 0 ? 1e-4 : z(a.value)) : v.value.left
1057
- ),
1058
- y: v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1059
- width: r(P)(
1060
- z(a.value) <= 0 ? 1e-4 : z(a.value)
1061
- ),
1062
- height: c.value <= 0 ? 1e-4 : c.value,
1063
- fill: `url(#pattern_${A.value}_${a.absoluteIndex})`,
1064
- rx: e.value.style.chart.layout.bars.borderRadius,
1065
- stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
1066
- "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
1067
- class: Q({ animated: e.value.useCssAnimation })
1068
- }, null, 10, cl)) : g("", !0),
1069
- (!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !== T.value.length - 1 ? (n(), u("line", {
1070
- key: 1,
1071
- x1: F.value,
1072
- x2: e.value.style.chart.layout.separators.fullWidth ? 0 : v.value.left,
1073
- y1: c.value + C.value / 2 + v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1074
- y2: c.value + C.value / 2 + v.value.top + (C.value + c.value) * o + S.value[o] * L.value,
1075
- stroke: e.value.style.chart.layout.separators.color,
1076
- "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
1077
- "stroke-linecap": "round",
1078
- style: {
1079
- transition: "none !important",
1080
- animation: "none !important"
1081
- }
1082
- }, null, 8, dl)) : g("", !0),
1083
- Z.value && e.value.style.chart.layout.separators.show ? (n(), u("line", {
1084
- key: 2,
1085
- x1: v.value.left + v.value.width / 2,
1086
- x2: v.value.left + v.value.width / 2,
1087
- y1: v.value.top,
1088
- y2: v.value.bottom,
1089
- stroke: e.value.style.chart.layout.separators.color,
1090
- "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
1091
- "stroke-linecap": "round"
1092
- }, null, 8, hl)) : g("", !0)
1093
- ]))), 256)),
1094
- s("g", {
1095
- ref_key: "parentLabels",
1096
- ref: Wt
1097
- }, [
1098
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", pl, [
1099
- a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("rect", {
1100
- key: 0,
1101
- class: "vue-ui-horizontal-bar-parent-marker",
1102
- x: 2,
1103
- y: ae(a, o).y - e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1104
- height: e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1105
- width: e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1106
- rx: 1,
1107
- fill: a.color,
1108
- style: { animation: "none !important", transition: "none !important" }
1109
- }, null, 8, fl)) : g("", !0),
1110
- a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("text", {
1111
- key: 1,
1112
- y: ae(a, o).y,
1113
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
1114
- fill: e.value.style.chart.layout.bars.parentLabels.color,
1115
- x: e.value.style.chart.layout.bars.parentLabels.offsetX + e.value.style.chart.layout.bars.parentLabels.fontSize,
1116
- "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
1117
- "text-anchor": "start",
1118
- innerHTML: r(Ge)({
1119
- content: `${ft(a, o)}`,
1120
- fontSize: e.value.style.chart.layout.bars.parentLabels.fontSize,
1121
- fill: e.value.style.chart.layout.bars.parentLabels.color,
1122
- x: e.value.style.chart.layout.bars.parentLabels.offsetX + e.value.style.chart.layout.bars.parentLabels.fontSize,
1123
- y: ae(a, o).y,
1124
- translateY: !1
1125
- })
1126
- }, null, 8, gl)) : g("", !0),
1127
- a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("text", {
1128
- key: 2,
1129
- y: ae(a, o).y + r(Oa)(ft(a, o)) * e.value.style.chart.layout.bars.parentLabels.fontSize * 1.1,
1130
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
1131
- fill: e.value.style.chart.layout.bars.parentLabels.color,
1132
- x: e.value.style.chart.layout.bars.parentLabels.offsetX + e.value.style.chart.layout.bars.parentLabels.fontSize,
1133
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
1134
- "text-anchor": "start"
1135
- }, m(na(a, o)), 9, yl)) : g("", !0)
1136
- ]))), 256))
1137
- ], 512),
1138
- s("g", {
1139
- ref_key: "childLabels",
1140
- ref: Te
1141
- }, [
1142
- (n(!0), u(V, null, M(Qt.value, (a, o) => (n(), u("g", bl, [
1143
- (a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (n(), u("text", {
1144
- key: 0,
1145
- "text-anchor": "start",
1146
- x: Math.abs(e.value.style.chart.layout.bars.nameLabels.offsetX),
1147
- y: r(P)(v.value.top + (C.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2 + S.value[o] * L.value),
1148
- "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
1149
- fill: "transparent",
1150
- "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal",
1151
- style: { "user-select": "none" },
1152
- innerHTML: r(Ge)({
1153
- content: a.name,
1154
- fontSize: e.value.style.chart.layout.bars.nameLabels.fontSize,
1155
- fill: "transparent",
1156
- x: Math.abs(e.value.style.chart.layout.bars.nameLabels.offsetX),
1157
- y: r(P)(v.value.top + (C.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2 + S.value[o] * L.value),
1158
- translateY: !0
1159
- })
1160
- }, null, 8, ml)) : g("", !0)
1161
- ]))), 256))
1162
- ], 512),
1163
- s("g", null, [
1164
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", kl, [
1165
- (a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (n(), u("text", {
1166
- key: 0,
1167
- "text-anchor": "end",
1168
- x: v.value.left + e.value.style.chart.layout.bars.nameLabels.offsetX - 6,
1169
- y: v.value.top + (C.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 3 + S.value[o] * L.value,
1170
- "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
1171
- fill: e.value.style.chart.layout.bars.nameLabels.color,
1172
- "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal",
1173
- innerHTML: r(Ge)({
1174
- content: a.name,
1175
- fontSize: e.value.style.chart.layout.bars.nameLabels.fontSize,
1176
- fill: e.value.style.chart.layout.bars.nameLabels.color,
1177
- x: v.value.left + e.value.style.chart.layout.bars.nameLabels.offsetX - 6,
1178
- y: v.value.top + (C.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 3 + S.value[o] * L.value,
1179
- translateY: !0
1180
- })
1181
- }, null, 8, Cl)) : g("", !0)
1182
- ]))), 256))
1183
- ]),
1184
- s("g", {
1185
- ref_key: "dataLabels",
1186
- ref: Le
1187
- }, [
1188
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", wl, [
1189
- s("text", {
1190
- x: Z.value ? v.value.left + v.value.width / 2 + (a.sign === 1 ? -12 : 12) + (a.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : Math.min(
1191
- la(a.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
1192
- v.value.right - 2
1193
- ),
1194
- y: v.value.top + (C.value + c.value) * o + c.value / 2 + S.value[o] * L.value + e.value.style.chart.layout.bars.dataLabels.fontSize / 3,
1195
- "text-anchor": !Z.value || a.sign === -1 ? "start" : "end",
1196
- "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
1197
- fill: e.value.style.chart.layout.bars.dataLabels.color,
1198
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
1199
- }, m(gt(a.value, a, o, a.sign)), 9, xl)
1200
- ]))), 256))
1201
- ], 512),
1202
- (n(!0), u(V, null, M(T.value, (a, o) => (n(), u("g", null, [
1203
- s("rect", {
1204
- x: 0,
1205
- y: v.value.top + (C.value + c.value) * o - C.value / 2 + S.value[o] * L.value,
1206
- width: F.value,
1207
- height: c.value + C.value <= 0 ? 1e-4 : c.value + C.value,
1208
- fill: Ve.value === a.id ? r(We)(
1209
- e.value.style.chart.layout.highlighter.color,
1210
- e.value.style.chart.layout.highlighter.opacity
1211
- ) : "transparent",
1212
- onMouseenter: (y) => ra(a, o),
1213
- onMouseleave: (y) => sa({ datapoint: a, seriesIndex: o }),
1214
- onClick: (y) => ua({ datapoint: a, seriesIndex: o })
1215
- }, null, 40, _l)
1216
- ]))), 256)),
1217
- f(t.$slots, "svg", {
1218
- svg: {
1219
- ...X.value,
1220
- isPrintingImg: r(Ne) | r(Oe) | de.value,
1221
- isPrintingSvg: he.value
1222
- }
1223
- }, void 0, !0)
1224
- ], 512)
1225
- ], 14, al)),
1226
- t.$slots.watermark ? (n(), u("div", $l, [
1227
- f(t.$slots, "watermark", O(I({ isPrinting: r(Ne) || r(Oe) || de.value || he.value })), void 0, !0)
1228
- ])) : g("", !0),
1229
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (n(), u("div", {
1230
- key: 6,
1231
- ref_key: "chartLegend",
1232
- ref: xe
1233
- }, [
1234
- (n(), H(Pt, {
1235
- key: `legend_bottom_${_e.value}`,
1236
- legendSet: $.value,
1237
- config: vt.value,
1238
- isCursorPointer: Y.value,
1239
- onClickMarker: l[1] || (l[1] = ({ legend: a }) => K(a.id))
1240
- }, be({
1241
- item: h(({ legend: a, index: o }) => [
1242
- s("div", {
1243
- onClick: (y) => K(a.id),
1244
- style: p(`opacity:${w.value.includes(a.id) ? 0.5 : 1}`)
1245
- }, m(a.name) + ": " + m(r(ve)(
1246
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
1247
- a.value,
1248
- r(j)({
1249
- p: e.value.style.chart.legend.prefix,
1250
- v: a.value,
1251
- s: e.value.style.chart.legend.suffix,
1252
- r: e.value.style.chart.legend.roundingValue
1253
- }),
1254
- { datapoint: a, seriesIndex: o }
1255
- )), 13, Tl)
1256
- ]),
1257
- legendToggle: h(() => [
1258
- $.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !r(pe) ? (n(), H(zt, {
1259
- key: 0,
1260
- backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
1261
- color: e.value.style.chart.legend.selectAllToggle.color,
1262
- fontSize: e.value.style.chart.legend.fontSize,
1263
- checked: w.value.length > 0,
1264
- isCursorPointer: Y.value,
1265
- onToggle: dt
1266
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : g("", !0)
1267
- ]),
1268
- _: 2
1269
- }, [
1270
- t.$slots.pattern ? {
1271
- name: "legend-pattern",
1272
- fn: h(({ legend: a, index: o }) => [
1273
- ne(St, {
1274
- shape: a.shape,
1275
- radius: 30,
1276
- stroke: "none",
1277
- plot: { x: 30, y: 30 },
1278
- fill: `url(#pattern_${A.value}_${o})`
1279
- }, null, 8, ["shape", "fill"])
1280
- ]),
1281
- key: "0"
1282
- } : void 0
1283
- ]), 1032, ["legendSet", "config", "isCursorPointer"]))
1284
- ], 512)) : g("", !0),
1285
- f(t.$slots, "legend", { legend: $.value }, void 0, !0),
1286
- t.$slots.source ? (n(), u("div", {
1287
- key: 7,
1288
- ref_key: "source",
1289
- ref: Ze,
1290
- dir: "auto"
1291
- }, [
1292
- f(t.$slots, "source", {}, void 0, !0)
1293
- ], 512)) : g("", !0),
1294
- ne(r(It), {
1295
- teleportTo: e.value.style.chart.tooltip.teleportTo,
1296
- show: _.value.showTooltip && Ce.value && w.value.length < k.dataset.length,
1297
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1298
- color: e.value.style.chart.tooltip.color,
1299
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1300
- borderColor: e.value.style.chart.tooltip.borderColor,
1301
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1302
- fontSize: e.value.style.chart.tooltip.fontSize,
1303
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1304
- position: e.value.style.chart.tooltip.position,
1305
- offsetY: e.value.style.chart.tooltip.offsetY,
1306
- parent: B.value,
1307
- content: we.value,
1308
- isFullscreen: J.value,
1309
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
1310
- smooth: e.value.style.chart.tooltip.smooth,
1311
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1312
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1313
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1314
- }, {
1315
- "tooltip-before": h(() => [
1316
- f(t.$slots, "tooltip-before", O(I({ ...Me.value })), void 0, !0)
1317
- ]),
1318
- "tooltip-after": h(() => [
1319
- f(t.$slots, "tooltip-after", O(I({ ...Me.value })), void 0, !0)
1320
- ]),
1321
- _: 3
1322
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1323
- ke.value && e.value.userOptions.buttons.table ? (n(), H(Ta(ye.value.component), $t({ key: 8 }, ye.value.props, {
1324
- ref_key: "tableUnit",
1325
- ref: ue,
1326
- onClose: Be
1327
- }), be({
1328
- content: h(() => [
1329
- s("div", {
1330
- ref_key: "tableContainer",
1331
- ref: st,
1332
- class: "vue-ui-vertical-bar-table atom-data-table",
1333
- style: p(`${e.value.table.useDialog ? "" : "max-height: 300px; margin-top: 24px"}`)
1334
- }, [
1335
- s("div", Ll, [
1336
- e.value.table.useDialog ? g("", !0) : (n(), u("div", {
1337
- key: 0,
1338
- role: "button",
1339
- tabindex: "0",
1340
- style: p(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${Y.value ? "pointer" : "default"}; background:${e.value.table.th.backgroundColor};`),
1341
- onClick: Be,
1342
- onKeypress: La(Be, ["enter"])
1343
- }, [
1344
- ne(r(Ye), {
1345
- name: "close",
1346
- stroke: e.value.table.th.color,
1347
- "stroke-width": 2
1348
- }, null, 8, ["stroke"])
1349
- ], 36)),
1350
- s("div", {
1351
- style: { width: "100%", "container-type": "inline-size" },
1352
- class: Q({ "vue-ui-responsive": r(ca) })
1353
- }, [
1354
- s("table", Sl, [
1355
- e.value.table.useDialog ? g("", !0) : (n(), u("caption", {
1356
- key: 0,
1357
- style: p({
1358
- backgroundColor: e.value.table.th.backgroundColor,
1359
- color: e.value.table.th.color,
1360
- outline: e.value.table.th.outline
1361
- }),
1362
- class: "vue-ui-data-table__caption"
1363
- }, [
1364
- Tt(m(e.value.style.chart.title.text) + " ", 1),
1365
- e.value.style.chart.title.subtitle.text ? (n(), u("span", Pl, m(e.value.style.chart.title.subtitle.text), 1)) : g("", !0)
1366
- ], 4)),
1367
- s("thead", null, [
1368
- s("tr", {
1369
- role: "row",
1370
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
1371
- }, [
1372
- (n(!0), u(V, null, M(D.value.head, (a) => (n(), u("th", {
1373
- style: p(`outline:${e.value.table.th.outline}`)
1374
- }, [
1375
- s("div", zl, m(a), 1)
1376
- ], 4))), 256))
1377
- ], 4),
1378
- s("tr", null, [
1379
- s("th", {
1380
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1381
- }, null, 4),
1382
- s("th", {
1383
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
1384
- }, " ∑ " + m(e.value.table.td.prefix) + m(isNaN(E.value) ? "" : E.value.toFixed(e.value.table.td.roundingValue)) + m(e.value.table.td.suffix), 5),
1385
- s("th", {
1386
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
1387
- }, " 100% ", 4),
1388
- s("th", {
1389
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1390
- }, null, 4),
1391
- s("th", {
1392
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1393
- }, null, 4),
1394
- s("th", {
1395
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1396
- }, null, 4),
1397
- s("th", {
1398
- style: p(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1399
- }, null, 4)
1400
- ])
1401
- ]),
1402
- s("tbody", null, [
1403
- (n(!0), u(V, null, M(D.value.body, (a, o) => (n(), u("tr", {
1404
- class: Q({
1405
- "vue-ui-data-table__tbody__row": !0,
1406
- "vue-ui-data-table__tbody__row-even": o % 2 === 0,
1407
- "vue-ui-data-table__tbody__row-odd": o % 2 !== 0
1408
- }),
1409
- style: p(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
1410
- }, [
1411
- s("td", {
1412
- class: "vue-ui-data-table__tbody__td",
1413
- style: p(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
1414
- "data-cell": D.value.head[0] ?? ""
1415
- }, [
1416
- s("div", Nl, [
1417
- a.color ? (n(), u("span", {
1418
- key: 0,
1419
- style: p(`color:${a.color};margin-right:3px`)
1420
- }, "⬤", 4)) : g("", !0),
1421
- s("span", null, m(a.parentName), 1)
1422
- ])
1423
- ], 12, Al),
1424
- s("td", {
1425
- class: "vue-ui-data-table__tbody__td",
1426
- style: p(`outline:${e.value.table.td.outline}`),
1427
- "data-cell": D.value.head[1] ?? ""
1428
- }, [
1429
- s("div", Il, m(e.value.table.td.prefix) + m(["", NaN, void 0].includes(a.parentValue) ? "" : a.parentValue.toFixed(
1430
- e.value.table.td.roundingValue
1431
- )) + m(e.value.table.td.suffix), 1)
1432
- ], 12, Ol),
1433
- s("td", {
1434
- class: "vue-ui-data-table__tbody__td",
1435
- style: p(`outline:${e.value.table.td.outline}`),
1436
- "data-cell": D.value.head[2] ?? ""
1437
- }, [
1438
- s("div", Ml, m(["", NaN, void 0].includes(a.percentageToTotal) ? "" : `${(a.percentageToTotal * 100).toFixed(
1439
- e.value.table.td.roundingPercentage
1440
- )}%`), 1)
1441
- ], 12, Vl),
1442
- s("td", {
1443
- class: "vue-ui-data-table__tbody__td",
1444
- style: p(`outline:${e.value.table.td.outline}`),
1445
- "data-cell": D.value.head[3] ?? ""
1446
- }, [
1447
- s("div", Dl, m(a.childName), 1)
1448
- ], 12, Fl),
1449
- s("td", {
1450
- class: "vue-ui-data-table__tbody__td",
1451
- style: p(`outline:${e.value.table.td.outline}`),
1452
- "data-cell": D.value.head[4] ?? ""
1453
- }, [
1454
- s("div", El, m(e.value.table.td.prefix) + m(["", NaN, void 0].includes(a.childValue) ? "" : a.childValue.toFixed(
1455
- e.value.table.td.roundingValue
1456
- )) + m(e.value.table.td.suffix), 1)
1457
- ], 12, Bl),
1458
- s("td", {
1459
- class: "vue-ui-data-table__tbody__td",
1460
- style: p(`outline:${e.value.table.td.outline}`),
1461
- "data-cell": D.value.head[5] ?? ""
1462
- }, [
1463
- s("div", Xl, m(["", NaN, void 0].includes(
1464
- a.childPercentageToParent
1465
- ) ? "" : `${(a.childPercentageToParent * 100).toFixed(
1466
- e.value.table.td.roundingPercentage
1467
- )}%`), 1)
1468
- ], 12, Rl),
1469
- s("td", {
1470
- class: "vue-ui-data-table__tbody__td",
1471
- style: p(`outline:${e.value.table.td.outline}`),
1472
- "data-cell": D.value.head[6] ?? ""
1473
- }, [
1474
- s("div", Ul, m(["", NaN, void 0].includes(
1475
- a.childPercentageToTotal
1476
- ) ? "" : `${(a.childPercentageToTotal * 100).toFixed(
1477
- e.value.table.td.roundingPercentage
1478
- )}%`), 1)
1479
- ], 12, Hl)
1480
- ], 6))), 256))
1481
- ])
1482
- ])
1483
- ], 2)
1484
- ])
1485
- ], 4)
1486
- ]),
1487
- _: 2
1488
- }, [
1489
- e.value.table.useDialog ? {
1490
- name: "title",
1491
- fn: h(() => [
1492
- Tt(m(ye.value.title), 1)
1493
- ]),
1494
- key: "0"
1495
- } : void 0,
1496
- e.value.table.useDialog ? {
1497
- name: "actions",
1498
- fn: h(() => [
1499
- s("button", {
1500
- tabindex: "0",
1501
- class: "vue-ui-user-options-button",
1502
- onClick: l[2] || (l[2] = (a) => Fe(e.value.userOptions.callbacks.csv)),
1503
- style: p({ cursor: Y.value ? "pointer" : "default" })
1504
- }, [
1505
- ne(r(Ye), {
1506
- name: "fileCsv",
1507
- stroke: ye.value.props.color
1508
- }, null, 8, ["stroke"])
1509
- ], 4)
1510
- ]),
1511
- key: "1"
1512
- } : void 0
1513
- ]), 1040)) : g("", !0),
1514
- f(t.$slots, "skeleton", {}, () => [
1515
- r(pe) ? (n(), H(Xa, { key: 0 })) : g("", !0)
1516
- ], !0)
1517
- ], 46, el));
1518
- }
1519
- }, ho = /* @__PURE__ */ Qa(Wl, [["__scopeId", "data-v-26efb173"]]);
1520
- export {
1521
- ho as default
1522
- };