vue-data-ui 3.23.10 → 3.23.12

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