vue-data-ui 3.6.0 → 3.7.0

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