vue-data-ui 3.22.13 → 3.23.0

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