vue-data-ui 3.25.11 → 3.25.13

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