vue-data-ui 3.15.12 → 3.16.1

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