vue-data-ui 3.25.13 → 3.26.0

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