vue-data-ui 3.15.12 → 3.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -1,1717 +0,0 @@
1
- import { defineAsyncComponent as Ce, ref as d, computed as g, useSlots as jt, onMounted as Ua, toRefs as Zt, watch as E, nextTick as ke, onBeforeUnmount as Je, watchEffect as Ke, shallowRef as Qe, openBlock as F, createElementBlock as Ee, normalizeClass as Jt, normalizeStyle as ie, createBlock as U, createCommentVNode as X, createElementVNode as K, unref as C, createSlots as Xa, withCtx as b, renderSlot as k, normalizeProps as Q, guardReactiveProps as ee, createVNode as _a, Teleport as Kt, toDisplayString as ea, resolveDynamicComponent as Qt, mergeProps as el, createTextVNode as Va } from "vue";
2
- import { j as al, t as Ya, m as tl, p as oe, $ as ll, n as ol, D as aa, k as ve, l as ce, s as qa, H as ul, a7 as sl, J as nl, o as rl, q as il, T as Ga, u as we, x as vl, a0 as cl, a1 as dl, U as hl } from "./lib-GwPnJSrY.js";
3
- import { c as fl, a as ta, d as ml, t as yl, u as gl, l as w, r as Ne, b as q, p as ja } from "./useResponsive-DfdjqQps.js";
4
- import { u as pl, a as Za, b as bl } from "./useTimeLabels-C-A2uZKi.js";
5
- import { u as xl } from "./useConfig-CIgyKZ6R.js";
6
- import { u as Ll, B as Cl } from "./BaseScanner-BhhkKVoj.js";
7
- import { u as kl } from "./usePrinter-DiK5R6k-.js";
8
- import { u as Be } from "./useNestedProp-BBT0mbHh.js";
9
- import { u as wl } from "./useThemeCheck-D1ZYXUwG.js";
10
- import { u as Sl } from "./useUserOptionState-BIvW1Kz7.js";
11
- import { u as zl } from "./useChartAccessibility-9icAAmYg.js";
12
- import Tl from "./img-BYYzY_QU.js";
13
- import Ml from "./vue_ui_xy_canvas-6BBDSowT.js";
14
- import $l from "./Legend-1LMMsPxL.js";
15
- import Al from "./Title-BfyrP-jp.js";
16
- import Il from "./BaseIcon-CNx8Tzl5.js";
17
- import Fl from "./vue-ui-accordion-BGHTqIBt.js";
18
- import { S as Pl } from "./SlicerPreview-I2J0UUF_.js";
19
- import { B as Rl } from "./BaseLegendToggle-Y61xahI4.js";
20
- import { _ as Ol } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
- const Dl = ["id"], El = ["id"], Nl = ["id"], Bl = ["onClick"], Hl = {
22
- key: 4,
23
- class: "vue-data-ui-watermark"
24
- }, Wl = ["innerHTML"], Ul = {
25
- __name: "vue-ui-xy-canvas",
26
- props: {
27
- dataset: {
28
- type: Array,
29
- default() {
30
- return [];
31
- }
32
- },
33
- config: {
34
- type: Object,
35
- default() {
36
- return {};
37
- }
38
- },
39
- selectedXIndex: {
40
- type: Number,
41
- default: void 0
42
- }
43
- },
44
- emits: ["selectLegend", "selectX", "copyAlt"],
45
- setup(la, { expose: Ja, emit: Ka }) {
46
- const Qa = Ce(() => import("./Tooltip-DL3QgjZf.js")), et = Ce(() => import("./DataTable-Bo1pmAqG.js")), at = Ce(() => import("./UserOptions-CrLqEimB.js")), tt = Ce(() => import("./NonSvgPenAndPaper-CGk_xThe.js")), lt = Ce(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_xy_canvas: ot } = xl(), { isThemeValid: ut, warnInvalidTheme: st } = wl(), P = la, ae = d(al()), _ = d(null), ue = d(null), v = d(null), y = d(1), G = d(1), de = d(!1), h = d(null), Se = d(""), oa = d(null), x = d([]), se = d(1), N = d(!0), V = d(!0), ze = d(null), ua = d(0), he = d(!1), sa = d(null), na = d(null), j = d(null), ra = d(null), He = d(0), We = d(0), Ue = d(0), H = d(null), ia = d(!1), fe = d(null), Xe = d(null), me = d(!1), va = d(!1), Te = d(!1), S = d(null), _e = d(!1), Y = g(() => Array.isArray(Ve.value) && Ve.value.length > 0), Me = Ka, nt = jt();
47
- Ua(() => {
48
- nt["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
49
- });
50
- const a = d(qe()), te = g(() => a.value.userOptions.useCursorPointer), rt = g(() => !!a.value.debug), it = g(() => Ya({
51
- defaultConfig: {
52
- userOptions: { show: !1 },
53
- table: { show: !1 },
54
- style: {
55
- chart: {
56
- backgroundColor: "#99999930",
57
- grid: {
58
- x: {
59
- axisColor: "#6A6A6A",
60
- timeLabels: { show: !1 },
61
- axisName: "",
62
- horizontalLines: {
63
- color: "#6A6A6A"
64
- }
65
- },
66
- y: {
67
- axisColor: "#6A6A6A",
68
- axisLabels: { show: !1 },
69
- axisName: "",
70
- verticalLines: {
71
- color: "#6A6A6A"
72
- }
73
- },
74
- zeroLine: {
75
- color: "#6A6A6A"
76
- }
77
- },
78
- legend: {
79
- backgroundColor: "#99999930"
80
- },
81
- paddingProportions: {
82
- left: 0.05
83
- },
84
- scale: {
85
- max: null,
86
- min: null
87
- },
88
- zoom: {
89
- endIndex: null,
90
- startIndex: null
91
- }
92
- }
93
- }
94
- },
95
- userConfig: a.value.skeletonConfig ?? {}
96
- })), { loading: $e, FINAL_DATASET: Ve } = Ll({
97
- ...Zt(P),
98
- FINAL_CONFIG: a,
99
- prepareConfig: qe,
100
- skeletonDataset: P.config?.skeletonDataset ?? [
101
- {
102
- name: "",
103
- series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
104
- type: "line",
105
- smooth: !0,
106
- color: "#BABABA"
107
- },
108
- {
109
- name: "",
110
- series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
111
- type: "bar",
112
- color: "#AAAAAA"
113
- }
114
- ],
115
- skeletonConfig: Ya({
116
- defaultConfig: a.value,
117
- userConfig: it.value
118
- })
119
- }), { userOptionsVisible: Ye, setUserOptionsVisibility: ca, keepUserOptionState: da } = Sl({ config: a.value }), { svgRef: z } = zl({ config: a.value.style.chart.title });
120
- function vt() {
121
- ca(!0);
122
- }
123
- function ct() {
124
- ca(!1), Me("selectX", { seriesIndex: null, datapoint: null }), h.value = null;
125
- }
126
- function qe() {
127
- const e = Be({
128
- userConfig: P.config,
129
- defaultConfig: ot
130
- });
131
- let t = {};
132
- const l = e.theme;
133
- if (l)
134
- if (!ut.value(e))
135
- st(e), t = e;
136
- else {
137
- const n = Be({
138
- userConfig: Ml[l] || P.config,
139
- defaultConfig: e
140
- });
141
- t = {
142
- ...Be({
143
- userConfig: P.config,
144
- defaultConfig: n
145
- }),
146
- customPalette: e.customPalette.length ? e.customPalette : tl[l] || oe
147
- };
148
- }
149
- else
150
- t = e;
151
- return P.config && ll(P.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), t.style.chart.grid.x.timeLabels = Be({
152
- defaultConfig: t.style.chart.grid.x.timeLabels,
153
- userConfig: P.config.style.chart.grid.y.timeLabels
154
- })), t;
155
- }
156
- E(() => P.config, (e) => {
157
- $e.value || (a.value = qe()), Ye.value = !a.value.userOptions.showOnChartHover, Pa(), He.value += 1, We.value += 1, Ue.value += 1, c.value.showTable = a.value.table.show, c.value.showDataLabels = a.value.style.chart.dataLabels.show, c.value.stacked = a.value.style.chart.stacked, c.value.showTooltip = a.value.style.chart.tooltip.show;
158
- }, { deep: !0 }), E(() => P.dataset, async (e) => {
159
- !Array.isArray(e) || e.length === 0 || (await ke(), z.value && !v.value && (v.value = z.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, V.value = !0, await pe(), Ie(), He.value += 1, We.value += 1, Ue.value += 1);
160
- }, { deep: !0 });
161
- const ha = d(a.value.style.chart.aspectRatio), { isPrinting: fa, isImaging: ma, generatePdf: ya, generateImage: ga } = kl({
162
- elementId: `xy_canvas_${ae.value}`,
163
- fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas",
164
- options: a.value.userOptions.print
165
- }), c = d({
166
- showTable: a.value.table.show,
167
- showDataLabels: a.value.style.chart.dataLabels.show,
168
- stacked: a.value.style.chart.stacked,
169
- showTooltip: a.value.style.chart.tooltip.show
170
- });
171
- function pa(e) {
172
- he.value = e, ua.value += 1;
173
- }
174
- const ba = g(() => ol(a.value.customPalette)), xa = g(() => x.value.length === $.value.length), O = g(() => $.value ? Math.max(...$.value.filter((e, t) => xa.value ? !0 : !x.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
175
- function dt(e) {
176
- S.value = e, Z();
177
- }
178
- const La = d(0), ye = d(0);
179
- function ht() {
180
- if (!v.value || !a.value.style.chart.grid.x.timeLabels.show) return 0;
181
- const e = R.value || [], t = u.value.start ?? 0, l = u.value.end ?? 0;
182
- if (!Math.max(0, l - t)) return 0;
183
- const s = Math.round(
184
- y.value / 40 * a.value.style.chart.grid.x.timeLabels.fontSizeRatio
185
- ), i = `${a.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${s}px ${a.value.style.fontFamily}`;
186
- v.value.save(), v.value.font = i;
187
- let r = 0;
188
- for (let W = t; W < l; W += 1) {
189
- const B = e[W]?.text ?? `${W + 1}`, De = v.value.measureText(String(B));
190
- De.width > r && (r = De.width);
191
- }
192
- v.value.restore();
193
- const p = (a.value.style.chart.grid.x.timeLabels.rotation || 0) * Math.PI / 180, M = s, L = Math.abs(Math.sin(p)) * r + Math.abs(Math.cos(p)) * M, D = a.value.style.chart.grid.x.timeLabels.offsetY || 1, le = y.value / D;
194
- return Math.max(0, le + L + 4);
195
- }
196
- function ft() {
197
- La.value = ht();
198
- }
199
- function mt() {
200
- ye.value && cancelAnimationFrame(ye.value), ye.value = requestAnimationFrame(() => {
201
- requestAnimationFrame(() => {
202
- ft();
203
- });
204
- });
205
- }
206
- Je(() => {
207
- ye.value && cancelAnimationFrame(ye.value);
208
- });
209
- const o = g(() => {
210
- const e = y.value - y.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right), t = G.value * a.value.style.chart.paddingProportions.top, l = G.value * a.value.style.chart.paddingProportions.bottom, n = La.value, s = G.value - l - n, i = G.value - (t + l) - n;
211
- return {
212
- canvasWidth: y.value,
213
- canvasHeight: G.value,
214
- left: y.value * a.value.style.chart.paddingProportions.left,
215
- top: t,
216
- right: y.value - y.value * a.value.style.chart.paddingProportions.right,
217
- bottom: s,
218
- width: e,
219
- height: i,
220
- slot: e / (u.value.end - u.value.start)
221
- };
222
- });
223
- function Ca(e, t) {
224
- return e / t;
225
- }
226
- function yt({ hasAutoScale: e, series: t, min: l, max: n, scale: s, yOffset: i, individualHeight: r, stackIndex: f = null }) {
227
- return t.map((p, M) => {
228
- const L = s.min < 0 ? Math.abs(s.min) : 0, D = Ca(p + L, L + s.max);
229
- let le, W;
230
- e && (le = s.min, W = Ca(p - le, s.max - le));
231
- let B = 0;
232
- return f === null ? B = o.value.bottom - o.value.height * (e ? W : D) : B = o.value.bottom - i - r * (e ? W : D), {
233
- x: o.value.left + o.value.slot * M + o.value.slot / 2,
234
- y: B,
235
- value: p
236
- };
237
- });
238
- }
239
- const T = g(() => {
240
- const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...$.value.filter((r, f) => !x.value.includes(r.absoluteIndex)).flatMap((r) => r.series.slice(u.value.start, u.value.end))), t = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...$.value.filter((r, f) => !x.value.includes(r.absoluteIndex)).flatMap((r) => r.series.slice(u.value.start, u.value.end))), l = aa(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, a.value.style.chart.scale.ticks), n = l.min < 0 ? Math.abs(l.min) : 0, s = o.value.bottom - o.value.height * (n / (l.max + n)), i = l.ticks.map((r) => ({
241
- y: o.value.bottom - o.value.height * ((r + n) / (l.max + n)),
242
- x: o.value.left - 8,
243
- value: r
244
- }));
245
- return {
246
- absoluteMin: n,
247
- max: t,
248
- min: e,
249
- scale: l,
250
- yLabels: i,
251
- zero: s
252
- };
253
- }), gt = g(() => m.value.map((e) => `
254
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
255
- <svg viewBox="0 0 10 10" height="12" width="12">
256
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
257
- </svg>
258
- <span>${e.name ? e.name + ": " : ""}</span>
259
- <span>${ve(
260
- a.value.style.chart.dataLabels.formatter,
261
- e.series[h.value] ?? "-",
262
- ce({
263
- p: e.prefix || "",
264
- v: e.series[h.value] ?? "-",
265
- s: e.suffix || "",
266
- r: e.rounding || 0
267
- }),
268
- { datapoint: e, seriesIndex: h.value }
269
- )}</span>
270
- </div>
271
- `)), Ae = g(() => a.value.style.chart.line.cutNullValues), $ = g(() => Ve.value.map((e, t) => ({
272
- ...e,
273
- series: ul({
274
- data: sl(e.series, [], Ae.value),
275
- threshold: a.value.downsample.threshold
276
- }),
277
- absoluteIndex: t,
278
- color: qa(e.color || ba.value[t] || oe[t] || oe[t % oe.length])
279
- }))), pt = g(() => {
280
- if (!a.value.style.chart.zoom.minimap.show) return [];
281
- const e = $.value.filter((s) => !x.value.includes(s.absoluteIndex)), t = Math.max(...e.map((s) => s.series.length)), l = [];
282
- for (let s = 0; s < t; s += 1)
283
- l.push(e.map((i) => i.series[s] || 0).reduce((i, r) => (i || 0) + (r || 0), 0));
284
- const n = Math.min(...l);
285
- return l.map((s) => s + (n < 0 ? Math.abs(n) : 0));
286
- }), bt = g(() => a.value.style.chart.zoom.minimap.show ? $.value.map((t) => ({
287
- ...t,
288
- isVisible: !x.value.includes(t.absoluteIndex)
289
- })) : []);
290
- E(O, (e) => {
291
- e && pe();
292
- });
293
- const m = g(() => nl($.value.filter((e, t) => !x.value.includes(e.absoluteIndex))).map((e, t) => ({
294
- ...e,
295
- series: e.series.slice(u.value.start, u.value.end)
296
- })).map((e, t) => {
297
- let l = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, n = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
298
- l === n && (l = l >= 0 ? n - 1 : l, n = n >= 0 ? n : l + 1), e.series.filter((B) => ![null, void 0].includes(B)).map((B) => (B - l) / (n - l));
299
- const s = {
300
- valueMin: l,
301
- valueMax: n
302
- }, i = e.scaleSteps || a.value.style.chart.scale.ticks;
303
- let r;
304
- e.autoScaling ? r = aa(s.valueMin, s.valueMax, i) : r = aa(s.valueMin < 0 ? s.valueMin : 0, s.valueMax <= 0 ? 0 : s.valueMax, i);
305
- const f = c.value.stacked ? o.value.height * (1 - e.cumulatedStackRatio) : 0, p = c.value.stacked ? o.value.height / a.value.style.chart.stackGap : 0, M = c.value.stacked ? o.value.height * e.stackRatio - p : o.value.height, L = r.min < 0 ? Math.abs(r.min) : 0;
306
- let D;
307
- e.autoScaling && c.value.stacked && n <= 0 ? D = o.value.bottom - f - M : D = o.value.bottom - f - M * (L / (r.max + L));
308
- const le = r.ticks.map((B, De) => ({
309
- y: o.value.bottom - f - M * (De / (r.ticks.length - 1)),
310
- x: o.value.left - 8,
311
- value: B
312
- })), W = yt({
313
- hasAutoScale: c.value.stacked && e.autoScaling,
314
- series: e.series,
315
- min: c.value.stacked ? l : T.value.min,
316
- max: c.value.stacked ? n : T.value.max,
317
- scale: c.value.stacked ? r : T.value.scale,
318
- yOffset: f,
319
- individualHeight: M,
320
- stackIndex: c.value.stacked ? t : null
321
- });
322
- return {
323
- ...e,
324
- coordinatesLine: W,
325
- min: l,
326
- max: n,
327
- localScale: r,
328
- localZero: D,
329
- localMin: L,
330
- localYLabels: le,
331
- yOffset: f,
332
- individualHeight: M
333
- };
334
- })), u = d({
335
- start: 0,
336
- end: O.value
337
- }), A = d({ start: 0, end: O.value }), ge = d(null);
338
- function xt() {
339
- return new Promise((e) => requestAnimationFrame(
340
- () => requestAnimationFrame(() => e())
341
- ));
342
- }
343
- Je(() => {
344
- ge.value && cancelAnimationFrame(ge.value);
345
- });
346
- async function pe() {
347
- wa(), await ke(), ge.value && cancelAnimationFrame(ge.value), ge.value = requestAnimationFrame(async () => {
348
- await xt(), wa();
349
- });
350
- }
351
- const Lt = g(() => a.value.style.chart.zoom.preview.enable && (A.value.start !== u.value.start || A.value.end !== u.value.end));
352
- function ka(e, t) {
353
- A.value[e] = t;
354
- }
355
- async function wa() {
356
- if (!me.value) {
357
- me.value = !0;
358
- try {
359
- const { startIndex: e, endIndex: t } = a.value.style.chart.zoom, l = Math.max(...$.value.map((i) => i.series.length)), n = e ?? 0, s = t != null ? Math.min(Sa(t + 1), l) : l;
360
- Te.value = !0, u.value.start = n, u.value.end = s, A.value.start = n, A.value.end = s, Ge(), va.value = !0, await ke(), j.value && (j.value.setStartValue(u.value.start), j.value.setEndValue(u.value.end));
361
- } finally {
362
- queueMicrotask(() => {
363
- Te.value = !1;
364
- }), me.value = !1;
365
- }
366
- }
367
- }
368
- function Ct(e) {
369
- me.value || Te.value || e !== u.value.start && (u.value.start = e, A.value.start = e, Ge());
370
- }
371
- function kt(e) {
372
- if (me.value || Te.value) return;
373
- const t = Sa(e);
374
- t !== u.value.end && (u.value.end = t, A.value.end = t, Ge());
375
- }
376
- function Sa(e) {
377
- const t = O.value;
378
- return e > t ? t : e < 0 || e < u.value.start ? a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex + 1 : 1 : e;
379
- }
380
- function Ge() {
381
- const e = Math.max(
382
- 1,
383
- Math.max(...$.value.map((n) => n.series.length))
384
- );
385
- let t = Math.max(0, Math.min(u.value.start ?? 0, e - 1)), l = Math.max(t + 1, Math.min(u.value.end ?? e, e));
386
- (!Number.isFinite(t) || !Number.isFinite(l) || l <= t) && (t = 0, l = e), u.value = { start: t, end: l }, A.value.start = t, A.value.end = l, j.value && (j.value.setStartValue(t), j.value.setEndValue(l));
387
- }
388
- const wt = g(() => m.value.filter((e) => ["line", "plot", void 0].includes(e.type))), I = g(() => m.value.filter((e) => e.type === "bar"));
389
- function Ie() {
390
- if (!z.value || !ue.value) return;
391
- const e = ue.value.offsetWidth, t = ue.value.offsetHeight;
392
- z.value.width = e * se.value * 2, z.value.height = t * se.value * 2, y.value = e * se.value * 2, G.value = t * se.value * 2, v.value?.scale(se.value, se.value), Z();
393
- }
394
- E(Y, async (e) => {
395
- if (!e) {
396
- ze.value = null, de.value = !1, h.value = null, H.value = null;
397
- return;
398
- }
399
- await ke(), z.value && !v.value && (v.value = z.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, V.value = !0, await pe(), Ie(), Z();
400
- });
401
- function St() {
402
- if (v.value && (v.value.clearRect(0, 0, 1e4, 1e4), v.value.fillStyle = a.value.style.chart.backgroundColor, v.value.fillRect(0, 0, o.value.canvasWidth, o.value.canvasHeight), !!Y.value)) {
403
- if (c.value.stacked)
404
- a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength ? m.value.forEach((e) => {
405
- for (let t = 0; t < u.value.end - u.value.start + 1; t += 1)
406
- w(
407
- v.value,
408
- [
409
- {
410
- x: o.value.left + o.value.slot * t,
411
- y: o.value.bottom - e.yOffset - e.individualHeight
412
- },
413
- {
414
- x: o.value.left + o.value.slot * t,
415
- y: o.value.bottom - e.yOffset
416
- }
417
- ],
418
- {
419
- color: a.value.style.chart.grid.y.verticalLines.color
420
- }
421
- );
422
- }) : a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength && m.value.forEach((e) => {
423
- for (let t = u.value.start; t < u.value.end; t += 1)
424
- t % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 && w(
425
- v.value,
426
- [
427
- {
428
- x: o.value.left + o.value.slot * (t - u.value.start) + o.value.slot / 2,
429
- y: o.value.bottom - e.yOffset - e.individualHeight
430
- },
431
- {
432
- x: o.value.left + o.value.slot * (t - u.value.start) + o.value.slot / 2,
433
- y: o.value.bottom - e.yOffset
434
- }
435
- ],
436
- {
437
- color: a.value.style.chart.grid.y.verticalLines.color
438
- }
439
- );
440
- }), a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? m.value.forEach((e) => {
441
- e.localYLabels.forEach((t, l) => {
442
- l < e.localYLabels.length - 1 && Ne(
443
- v.value,
444
- [
445
- { x: o.value.left, y: t.y },
446
- { x: o.value.right, y: t.y },
447
- { x: o.value.right, y: e.localYLabels[l + 1].y },
448
- { x: o.value.left, y: e.localYLabels[l + 1].y }
449
- ],
450
- {
451
- fillColor: l % 2 === 0 ? "transparent" : we(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
452
- strokeColor: "transparent"
453
- }
454
- );
455
- });
456
- }) : m.value.forEach((e) => {
457
- e.localYLabels.slice(u.value.start, u.value.end).forEach((t) => {
458
- w(
459
- v.value,
460
- [
461
- { x: o.value.left, y: t.y },
462
- { x: o.value.right, y: t.y }
463
- ],
464
- {
465
- color: a.value.style.chart.grid.x.horizontalLines.color
466
- }
467
- );
468
- });
469
- })), a.value.style.chart.grid.zeroLine.show && m.value.forEach((e) => {
470
- w(
471
- v.value,
472
- [
473
- { x: o.value.left, y: e.localZero },
474
- { x: o.value.right, y: e.localZero }
475
- ],
476
- {
477
- color: a.value.style.chart.grid.zeroLine.color,
478
- lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
479
- }
480
- );
481
- }), a.value.style.chart.grid.y.axisLabels.show && m.value.forEach((e) => {
482
- w(
483
- v.value,
484
- [
485
- { x: o.value.left, y: o.value.bottom - e.yOffset },
486
- { x: o.value.left, y: o.value.bottom - e.yOffset - e.individualHeight }
487
- ],
488
- {
489
- color: e.color
490
- }
491
- ), w(
492
- v.value,
493
- [
494
- { x: o.value.right, y: o.value.bottom - e.yOffset },
495
- { x: o.value.right, y: o.value.bottom - e.yOffset - e.individualHeight }
496
- ],
497
- {
498
- color: e.color
499
- }
500
- );
501
- }), m.value.forEach((e) => {
502
- q(
503
- v.value,
504
- e.name,
505
- y.value / 35,
506
- o.value.bottom - e.yOffset - e.individualHeight / 2,
507
- {
508
- align: "center",
509
- rotation: -90,
510
- color: e.color,
511
- font: `${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`
512
- }
513
- );
514
- });
515
- else {
516
- if (a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
517
- for (let e = 0; e < u.value.end - u.value.start + 1; e += 1)
518
- w(
519
- v.value,
520
- [
521
- { x: o.value.left + o.value.slot * e, y: o.value.top },
522
- { x: o.value.left + o.value.slot * e, y: o.value.bottom }
523
- ],
524
- {
525
- color: a.value.style.chart.grid.y.verticalLines.color
526
- }
527
- );
528
- else if (a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
529
- for (let e = u.value.start; e < u.value.end; e += 1)
530
- e % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 && w(
531
- v.value,
532
- [
533
- { x: o.value.left + o.value.slot * (e - u.value.start) + o.value.slot / 2, y: o.value.top },
534
- { x: o.value.left + o.value.slot * (e - u.value.start) + o.value.slot / 2, y: o.value.bottom }
535
- ],
536
- {
537
- color: a.value.style.chart.grid.y.verticalLines.color
538
- }
539
- );
540
- a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? T.value.yLabels.forEach((e, t) => {
541
- t < T.value.yLabels.length - 1 && Ne(
542
- v.value,
543
- [
544
- { x: o.value.left, y: e.y },
545
- { x: o.value.right, y: e.y },
546
- { x: o.value.right, y: T.value.yLabels[t + 1].y },
547
- { x: o.value.left, y: T.value.yLabels[t + 1].y }
548
- ],
549
- {
550
- fillColor: t % 2 === 0 ? "transparent" : we(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
551
- strokeColor: "transparent"
552
- }
553
- );
554
- }) : T.value.yLabels.forEach((e) => {
555
- w(
556
- v.value,
557
- [
558
- { x: o.value.left, y: e.y },
559
- { x: o.value.right, y: e.y }
560
- ],
561
- {
562
- color: a.value.style.chart.grid.x.horizontalLines.color
563
- }
564
- );
565
- })), a.value.style.chart.grid.y.showAxis && w(
566
- v.value,
567
- [
568
- { x: o.value.left, y: o.value.top },
569
- { x: o.value.left, y: o.value.bottom }
570
- ],
571
- {
572
- color: a.value.style.chart.grid.y.axisColor,
573
- lineWidth: a.value.style.chart.grid.y.axisThickness
574
- }
575
- ), a.value.style.chart.grid.x.showAxis && w(
576
- v.value,
577
- [
578
- { x: o.value.left, y: o.value.bottom },
579
- { x: o.value.right, y: o.value.bottom }
580
- ],
581
- {
582
- color: a.value.style.chart.grid.x.axisColor,
583
- lineWidth: a.value.style.chart.grid.x.axisThickness
584
- }
585
- ), a.value.style.chart.grid.zeroLine.show && w(
586
- v.value,
587
- [
588
- { x: o.value.left, y: T.value.zero },
589
- { x: o.value.right, y: T.value.zero }
590
- ],
591
- {
592
- color: a.value.style.chart.grid.zeroLine.color,
593
- lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
594
- }
595
- );
596
- }
597
- a.value.style.chart.grid.y.axisName && q(
598
- v.value,
599
- a.value.style.chart.grid.y.axisName,
600
- y.value - y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
601
- o.value.bottom - o.value.height / 2,
602
- {
603
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
604
- color: a.value.style.chart.color,
605
- align: "center",
606
- rotation: 90
607
- }
608
- ), a.value.style.chart.grid.x.axisName && q(
609
- v.value,
610
- a.value.style.chart.grid.x.axisName,
611
- y.value / 2,
612
- G.value,
613
- {
614
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
615
- color: a.value.style.chart.color,
616
- align: "center"
617
- }
618
- );
619
- }
620
- }
621
- function zt(e) {
622
- for (let t = 0; t < e.coordinatesLine.length; t += 1) {
623
- const l = (h.value === t || S.value === t ? y.value / 150 : a.value.style.chart.line.plots.show || e.type === "plot" ? y.value / 200 : 0) * a.value.style.chart.line.plots.radiusRatio;
624
- ta(
625
- v.value,
626
- { x: e.coordinatesLine[t].x, y: e.coordinatesLine[t].y },
627
- l,
628
- {
629
- color: a.value.style.chart.backgroundColor,
630
- fillStyle: e.color
631
- }
632
- );
633
- }
634
- }
635
- function Tt() {
636
- m.value.forEach((e) => {
637
- e.showYMarker && xe(e) && q(
638
- v.value,
639
- ve(
640
- a.value.style.chart.dataLabels.formatter,
641
- xe(e).value,
642
- ce({
643
- p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
644
- v: xe(e).value,
645
- s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
646
- r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
647
- }),
648
- { datapoint: xe(e), seriesIndex: null }
649
- ),
650
- o.value.left - 8 + a.value.style.chart.grid.y.axisLabels.offsetX,
651
- xe(e).y,
652
- {
653
- align: "right",
654
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
655
- color: e.color
656
- }
657
- );
658
- });
659
- }
660
- function Mt() {
661
- a.value.style.chart.grid.y.axisLabels.show && (c.value.stacked ? m.value.forEach((e) => {
662
- e.localYLabels.forEach((t, l) => {
663
- q(
664
- v.value,
665
- ve(
666
- a.value.style.chart.dataLabels.formatter,
667
- t.value,
668
- ce({
669
- p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
670
- v: t.value,
671
- s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
672
- r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
673
- }),
674
- { datapoint: t, seriesIndex: l }
675
- ),
676
- t.x + a.value.style.chart.grid.y.axisLabels.offsetX,
677
- t.y,
678
- {
679
- align: "right",
680
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
681
- color: e.color,
682
- globalAlpha: e.showYMarker && ![null, void 0].includes(h.value ?? S.value) ? 0.2 : 1
683
- }
684
- );
685
- });
686
- }) : T.value.yLabels.forEach((e, t) => {
687
- q(
688
- v.value,
689
- ve(
690
- a.value.style.chart.dataLabels.formatter,
691
- e.value,
692
- ce({
693
- p: a.value.style.chart.grid.y.axisLabels.prefix || "",
694
- v: e.value,
695
- s: a.value.style.chart.grid.y.axisLabels.suffix || "",
696
- r: a.value.style.chart.grid.y.axisLabels.rounding || 0
697
- }),
698
- { datapoint: e, seriesIndex: t }
699
- ),
700
- e.x + a.value.style.chart.grid.y.axisLabels.offsetX,
701
- e.y,
702
- {
703
- align: "right",
704
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
705
- color: a.value.style.chart.grid.y.axisLabels.color,
706
- globalAlpha: m.value.some((l) => l.showYMarker) && ![null, void 0].includes(h.value ?? S.value) ? 0.2 : 1
707
- }
708
- );
709
- }));
710
- }
711
- function $t(e) {
712
- for (let t = 0; t < e.coordinatesLine.length; t += 1)
713
- q(
714
- v.value,
715
- ve(
716
- a.value.style.chart.dataLabels.formatter,
717
- e.coordinatesLine[t].value,
718
- ce({
719
- p: e.prefix || "",
720
- v: e.coordinatesLine[t].value,
721
- s: e.suffix || "",
722
- r: e.rounding || 0
723
- }),
724
- { datapoint: e.coordinatesLine[t], seriesIndex: t }
725
- ),
726
- e.coordinatesLine[t].x,
727
- e.coordinatesLine[t].y + a.value.style.chart.dataLabels.offsetY,
728
- {
729
- align: "center",
730
- font: `${a.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
731
- color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color,
732
- strokeColor: a.value.style.chart.backgroundColor,
733
- lineWidth: 0.5
734
- }
735
- );
736
- }
737
- const R = d([]);
738
- let za = 0;
739
- Ke(() => {
740
- const e = ++za;
741
- (async () => {
742
- const t = await pl({
743
- values: a.value.style.chart.grid.x.timeLabels.values,
744
- maxDatapoints: O.value,
745
- formatter: a.value.style.chart.grid.x.timeLabels.datetimeFormatter,
746
- start: 0,
747
- end: O.value
748
- });
749
- e === za && (R.value = t);
750
- })();
751
- }), Ke(() => {
752
- a.value.style.chart.grid.x.timeLabels.show, a.value.style.chart.grid.x.timeLabels.rotation, a.value.style.chart.grid.x.timeLabels.offsetY, a.value.style.chart.grid.x.timeLabels.fontSizeRatio, a.value.style.chart.grid.x.timeLabels.bold, u.value.start, u.value.end, y.value, G.value, (R.value || []).map((e) => e?.text ?? "").join("|"), mt();
753
- }, { flush: "post" });
754
- const Ta = d({ months: [], shortMonths: [], days: [], shortDays: [] });
755
- let Ma = 0;
756
- Ke(() => {
757
- const e = ++Ma, t = a.value.style.chart.grid.x.timeLabels.datetimeFormatter;
758
- (async () => {
759
- const l = await Za(t.locale).catch(() => Za("en"));
760
- e === Ma && (Ta.value = l.data);
761
- })();
762
- });
763
- const $a = g(() => {
764
- const e = a.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = bl({
765
- useUTC: e.useUTC,
766
- locale: Ta.value,
767
- januaryAsYear: e.januaryAsYear
768
- });
769
- return (l, n) => {
770
- const i = a.value.style.chart.grid.x.timeLabels.values?.[l];
771
- return i == null ? "" : t.formatDate(new Date(i), n);
772
- };
773
- }), Aa = g(() => (a.value.style.chart.grid.x.timeLabels.values || []).map((t, l) => ({
774
- text: $a.value(l, a.value.style.chart.zoom.timeFormat),
775
- absoluteIndex: l
776
- }))), At = g(() => (a.value.style.chart.grid.x.timeLabels.values || []).map((t, l) => ({
777
- text: $a.value(l, a.value.style.chart.tooltip.timeFormat),
778
- absoluteIndex: l
779
- })));
780
- function It() {
781
- for (let e = u.value.start; e < u.value.end; e += 1)
782
- (u.value.end - u.value.start < a.value.style.chart.grid.x.timeLabels.modulo || u.value.end - u.value.start >= a.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 || (e === h.value + u.value.start || e === S.value) && a.value.style.chart.grid.x.timeLabels.showMarker)) && q(
783
- v.value,
784
- R.value[e] ? R.value[e].text : e + 1,
785
- o.value.left + o.value.slot * (e - u.value.start) + o.value.slot / 2,
786
- o.value.bottom + y.value / a.value.style.chart.grid.x.timeLabels.offsetY,
787
- {
788
- align: a.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : a.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
789
- font: `${a.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
790
- color: a.value.style.chart.grid.x.timeLabels.showMarker ? we(a.value.style.chart.grid.x.timeLabels.color, h.value !== null || S.value !== null ? h.value + u.value.start === e || S.value === e ? 100 : 20 : 100) : a.value.style.chart.grid.x.timeLabels.color,
791
- rotation: a.value.style.chart.grid.x.timeLabels.rotation
792
- }
793
- );
794
- }
795
- function Ia() {
796
- w(
797
- v.value,
798
- [
799
- { x: o.value.left + o.value.slot * (h.value ?? S.value) + o.value.slot / 2, y: o.value.top },
800
- { x: o.value.left + o.value.slot * (h.value ?? S.value) + o.value.slot / 2, y: o.value.bottom }
801
- ],
802
- {
803
- color: a.value.style.chart.selector.color,
804
- lineDash: a.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
805
- lineWidth: 2
806
- }
807
- );
808
- }
809
- function Ft() {
810
- H.value && w(
811
- v.value,
812
- [
813
- { x: o.value.left, y: H.value },
814
- { x: o.value.right, y: H.value }
815
- ],
816
- {
817
- color: a.value.style.chart.selector.color,
818
- lineDash: a.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
819
- lineWidth: 2
820
- }
821
- );
822
- }
823
- function Pt() {
824
- I.value.forEach((e, t) => {
825
- for (let l = 0; l < e.coordinatesLine.length; l += 1)
826
- Ne(
827
- v.value,
828
- [
829
- {
830
- x: o.value.left + o.value.slot * l + o.value.slot / 10 + (c.value.stacked ? 0 : o.value.slot / I.value.length * t - (t === 0 ? 0 : o.value.slot / (5 * I.value.length) * t)),
831
- y: c.value.stacked ? e.localZero : T.value.zero
832
- },
833
- {
834
- x: o.value.left + o.value.slot * l + o.value.slot / 10 + (c.value.stacked ? 0 : o.value.slot / I.value.length * t - (t === 0 ? 0 : o.value.slot / (5 * I.value.length) * t)) + o.value.slot * 0.8 / (c.value.stacked ? 1 : I.value.length),
835
- y: c.value.stacked ? e.localZero : T.value.zero
836
- },
837
- {
838
- x: o.value.left + o.value.slot * l + o.value.slot / 10 + (c.value.stacked ? 0 : o.value.slot / I.value.length * t - (t === 0 ? 0 : o.value.slot / (5 * I.value.length) * t)) + o.value.slot * 0.8 / (c.value.stacked ? 1 : I.value.length),
839
- y: e.coordinatesLine[l].y
840
- },
841
- {
842
- x: o.value.left + o.value.slot * l + o.value.slot / 10 + (c.value.stacked ? 0 : o.value.slot / I.value.length * t - (t === 0 ? 0 : o.value.slot / (5 * I.value.length) * t)),
843
- y: e.coordinatesLine[l].y
844
- }
845
- ],
846
- {
847
- strokeColor: a.value.style.chart.backgroundColor,
848
- gradient: {
849
- type: "linear",
850
- start: {
851
- x: e.coordinatesLine[l].x,
852
- y: e.coordinatesLine[l].y
853
- },
854
- end: {
855
- x: e.coordinatesLine[l].x,
856
- y: c.value.stacked ? e.localZero : T.value.zero
857
- },
858
- stops: [
859
- { offset: 0, color: e.color },
860
- { offset: 1, color: a.value.style.chart.bar.gradient.show ? vl(e.color, 0.5) : e.color }
861
- ]
862
- }
863
- }
864
- ), c.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && q(
865
- v.value,
866
- ve(
867
- a.value.style.chart.dataLabels.formatter,
868
- e.coordinatesLine[l].value,
869
- ce({
870
- p: e.prefix || "",
871
- v: e.coordinatesLine[l].value,
872
- s: e.suffix || "",
873
- r: e.rounding || 0
874
- }),
875
- { datapoint: e.coordinatesLine[l], seriesIndex: l }
876
- ),
877
- o.value.left + o.value.slot * l + o.value.slot / 10 + (c.value.stacked ? 0 : o.value.slot / I.value.length * t - (t === 0 ? 0 : o.value.slot / (5 * I.value.length) * t)) + o.value.slot * 0.4 / (c.value.stacked ? 1 : I.value.length),
878
- (e.coordinatesLine[l].value < 0 ? c.value.stacked ? e.localZero : T.value.zero : e.coordinatesLine[l].y) + a.value.style.chart.dataLabels.offsetY,
879
- {
880
- align: "center",
881
- font: `${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
882
- color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color,
883
- strokeColor: a.value.style.chart.backgroundColor,
884
- lineWidth: 0.8
885
- }
886
- );
887
- });
888
- }
889
- function Rt(e, t) {
890
- const l = e.coordinatesLine.map((r, f) => {
891
- const p = e.series[f];
892
- return p != null && Number.isFinite(r?.y) ? r : null;
893
- }), n = [], s = [];
894
- let i = [];
895
- for (let r = 0; r < l.length; r += 1) {
896
- const f = l[r];
897
- if (f)
898
- i.push(f);
899
- else {
900
- if (i.length >= 2) {
901
- const p = i[0], M = i[i.length - 1];
902
- n.push([
903
- { x: p.x, y: t },
904
- ...i,
905
- { x: M.x, y: t }
906
- ]);
907
- } else i.length === 1 && s.push(i[0]);
908
- i = [];
909
- }
910
- }
911
- if (i.length >= 2) {
912
- const r = i[0], f = i[i.length - 1];
913
- n.push([
914
- { x: r.x, y: t },
915
- ...i,
916
- { x: f.x, y: t }
917
- ]);
918
- } else i.length === 1 && s.push(i[0]);
919
- return { polygons: n, singles: s };
920
- }
921
- function Ot(e) {
922
- const t = e.coordinatesLine.map((s, i) => {
923
- const r = e.series[i];
924
- return r != null && Number.isFinite(s?.y) ? s : null;
925
- }), l = [];
926
- let n = [];
927
- for (let s = 0; s < t.length; s += 1) {
928
- const i = t[s];
929
- i ? n.push(i) : (n.length >= 2 && l.push(n), n = []);
930
- }
931
- return n.length >= 2 && l.push(n), l;
932
- }
933
- function Fa(e) {
934
- if (Ae.value) {
935
- const t = Ot(e);
936
- for (const l of t)
937
- w(v.value, l, {
938
- color: e.color,
939
- lineWidth: 3
940
- });
941
- } else
942
- w(v.value, e.coordinatesLine, {
943
- color: e.color,
944
- lineWidth: 3
945
- });
946
- }
947
- function Dt(e) {
948
- const t = !!Ae.value;
949
- if (e.useArea) {
950
- const l = c.value.stacked ? e.localZero : T.value.zero;
951
- if (t) {
952
- const { polygons: n, singles: s } = Rt(e, l);
953
- for (const r of n)
954
- ja(v.value, r, {
955
- fillColor: we(e.color, a.value.style.chart.area.opacity),
956
- strokeColor: "transparent"
957
- });
958
- const i = y.value / 200 * a.value.style.chart.line.plots.radiusRatio;
959
- for (const r of s)
960
- ta(
961
- v.value,
962
- { x: r.x, y: r.y },
963
- i,
964
- {
965
- color: a.value.style.chart.backgroundColor,
966
- fillStyle: e.color
967
- }
968
- );
969
- } else {
970
- const n = { x: e.coordinatesLine[0].x, y: l }, s = { x: e.coordinatesLine.at(-1).x, y: l };
971
- ja(
972
- v.value,
973
- [n, ...e.coordinatesLine, s],
974
- {
975
- fillColor: we(e.color, a.value.style.chart.area.opacity),
976
- strokeColor: "transparent"
977
- }
978
- );
979
- }
980
- Fa(e);
981
- return;
982
- }
983
- Fa(e);
984
- }
985
- function Et() {
986
- m.value.forEach((e, t) => {
987
- w(
988
- v.value,
989
- [
990
- { x: o.value.left, y: o.value.bottom - e.yOffset },
991
- { x: o.value.right, y: o.value.bottom - e.yOffset }
992
- ],
993
- {
994
- color: a.value.style.chart.grid.x.horizontalLines.color,
995
- lineWidth: 1
996
- }
997
- );
998
- });
999
- }
1000
- function Nt() {
1001
- const { left: e, top: t, width: l, height: n } = o.value, s = u.value.start, r = u.value.end - s, f = l / r, p = A.value.start - s, M = A.value.end - s, L = Math.max(0, Math.min(r, p)), D = Math.max(0, Math.min(r, M));
1002
- Ne(
1003
- v.value,
1004
- [
1005
- { x: e + L * f, y: t },
1006
- { x: e + L * f + (D - L) * f, y: t },
1007
- { x: e + L * f + (D - L) * f, y: t + n },
1008
- { x: e + L * f, y: t + n }
1009
- ],
1010
- {
1011
- fillColor: a.value.style.chart.zoom.preview.fill,
1012
- strokeColor: a.value.style.chart.zoom.preview.stroke,
1013
- lineDash: Array(4).fill(a.value.style.chart.zoom.preview.strokeDasharray),
1014
- lineWidth: a.value.style.chart.zoom.preview.strokeWidth
1015
- }
1016
- );
1017
- }
1018
- function Z() {
1019
- !Y.value || !z.value || !v.value || (St(), N.value ? ((h.value !== null || S.value !== null) && a.value.style.chart.selector.show && Ia(), Pt(), c.value.stacked && a.value.style.chart.grid.x.showAxis && Et(), wt.value.forEach((e) => {
1020
- (e.type === "line" || !e.type) && Dt(e), V.value && (zt(e), c.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && $t(e));
1021
- }), z.value && (ze.value = fl(z.value))) : (ze.value && (v.value.clearRect(0, 0, 1e4, 1e4), v.value.drawImage(ze.value, 0, 0)), (h.value !== null || S.value !== null) && a.value.style.chart.selector.show && Ia(), (h.value !== null || S.value !== null) && m.value.forEach((e) => {
1022
- const t = h.value ?? S.value, l = e.coordinatesLine[t];
1023
- (e.type === "line" || !e.type || e.type === "plot") && l && Number.isFinite(l.x) && Number.isFinite(l.y) && ta(
1024
- v.value,
1025
- { x: l.x, y: l.y },
1026
- y.value / 150 * a.value.style.chart.line.plots.radiusRatio,
1027
- {
1028
- color: a.value.style.chart.backgroundColor,
1029
- fillStyle: e.color
1030
- }
1031
- );
1032
- })), a.value.style.chart.grid.x.timeLabels.show && It(), a.value.style.chart.selector.show && a.value.style.chart.selector.showHorizontalSelector && Ft(), Mt(), Tt(), a.value.style.chart.zoom.preview.enable && (u.value.start !== A.value.start || u.value.end !== A.value.end) && Nt(), N.value = !1);
1033
- }
1034
- const be = ml(() => {
1035
- V.value = !0, Ie();
1036
- }, O.value > 200 ? 10 : 1, !V.value);
1037
- function xe(e) {
1038
- if ([null, void 0].includes(h.value ?? S.value) || !e.coordinatesLine[h.value ?? S.value]) return !1;
1039
- const { y: t, value: l } = e.coordinatesLine[h.value ?? S.value];
1040
- return { y: t, value: l };
1041
- }
1042
- function Bt(e) {
1043
- if (!Y.value || !z.value || xa.value) return;
1044
- const { left: t, top: l } = z.value.getBoundingClientRect(), n = e.clientX - t;
1045
- if (H.value = (e.clientY - l) * 2, (H.value < o.value.top || H.value > o.value.bottom) && (H.value = null), n * 2 < o.value.left || n * 2 > o.value.right) {
1046
- de.value = !1, h.value = null;
1047
- return;
1048
- }
1049
- const s = n * 2 - o.value.left;
1050
- if (h.value = Math.floor(s / o.value.slot), de.value = !0, !V.value) return;
1051
- let i = "";
1052
- const r = a.value.style.chart.tooltip.customFormat, f = m.value.map((p) => ({
1053
- shape: p.shape || null,
1054
- name: p.name,
1055
- color: p.color,
1056
- type: p.type || "line",
1057
- value: p.series.find((M, L) => L === h.value)
1058
- }));
1059
- Ht({ seriesIndex: h.value, datapoint: f }), Ga(r) && hl(() => r({
1060
- seriesIndex: h.value,
1061
- datapoint: f,
1062
- series: m.value,
1063
- config: a.value
1064
- })) ? Se.value = r({
1065
- seriesIndex: h.value,
1066
- datapoint: f,
1067
- series: m.value,
1068
- config: a.value
1069
- }) : (a.value.style.chart.grid.x.timeLabels.values.slice(u.value.start, u.value.end)[h.value] ? i += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${a.value.style.chart.tooltip.useDefaultTimeFormat ? R.value.slice(u.value.start, u.value.end)[h.value]?.text : At.value[h.value]?.text}</div>` : i += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${R.value[h.value + u.value.start]?.text ?? ""}</div>`, i += gt.value.join(""), Se.value = i), V.value = !1;
1070
- }
1071
- function Ht({ seriesIndex: e, datapoint: t }) {
1072
- const l = u.value.start + e;
1073
- Me("selectX", {
1074
- dataset: t,
1075
- index: l,
1076
- indexLabel: ""
1077
- });
1078
- }
1079
- E(() => P.selectedXIndex, (e) => {
1080
- if ([null, void 0].includes(P.selectedXIndex)) {
1081
- h.value = null;
1082
- return;
1083
- }
1084
- const t = e - u.value.start;
1085
- t < 0 || e >= u.value.end ? h.value = null : h.value = t ?? null;
1086
- }, { immediate: !0 }), E(() => h.value, (e) => {
1087
- be();
1088
- }), E(() => u.value, (e) => {
1089
- N.value = !0, Z();
1090
- }, {
1091
- deep: !0
1092
- }), E(() => A.value, (e) => {
1093
- Z();
1094
- }, { deep: !0 }), E(() => c.value.showDataLabels, (e) => {
1095
- N.value = !0, Z();
1096
- }), E(() => H.value, (e) => {
1097
- e && Z();
1098
- }), E(() => c.value.stacked, (e) => {
1099
- N.value = !0, V.value = !0, be();
1100
- });
1101
- function Wt() {
1102
- de.value = !1, h.value = null, Se.value = "", H.value = null, Z();
1103
- }
1104
- const J = Qe(null), ne = Qe(null), re = Qe(null);
1105
- Ua(() => {
1106
- ia.value = !0, Pa();
1107
- });
1108
- function Pa() {
1109
- if (rl(P.dataset) && rt.value && il({ componentName: "VueUiXyCanvas", type: "dataset" }), ke(() => {
1110
- z.value && !v.value && (v.value = z.value.getContext("2d", { willReadFrequently: !0 })), v.value && Y.value && (N.value = !0, V.value = !0, Ie());
1111
- }), a.value.responsive) {
1112
- const e = yl(() => {
1113
- const { width: t, height: l } = gl({
1114
- chart: _.value,
1115
- title: a.value.style.chart.title.text ? sa.value : null,
1116
- legend: a.value.style.chart.legend.show ? na.value : null,
1117
- slicer: a.value.style.chart.zoom.show && O.value > 6 ? j.value?.$el : null,
1118
- source: ra.value
1119
- });
1120
- requestAnimationFrame(() => {
1121
- ha.value = `${t} / ${l}`;
1122
- });
1123
- });
1124
- J.value && (ne.value && J.value.unobserve(ne.value), J.value.disconnect()), J.value = new ResizeObserver(e), ne.value = _.value.parentNode, J.value.observe(ne.value);
1125
- }
1126
- re.value && re.value.disconnect(), re.value = new ResizeObserver(async (e) => {
1127
- for (const t of e)
1128
- t.contentBoxSize && ue.value && (N.value = !0, be());
1129
- }), re.value.observe(ue.value), pe();
1130
- }
1131
- Je(() => {
1132
- re.value && re.value.disconnect(), J.value && (ne.value && J.value.unobserve(ne.value), J.value.disconnect());
1133
- });
1134
- function Ut() {
1135
- x.value.length ? x.value = [] : Pe.value.forEach((e, t) => {
1136
- x.value.push(t);
1137
- }), N.value = !0, be();
1138
- }
1139
- function Fe(e) {
1140
- Me("selectLegend", m.value.find((t) => t.absoluteIndex === e)), x.value.includes(e) ? x.value = x.value.filter((t) => t !== e) : x.value.push(e), N.value = !0, be();
1141
- }
1142
- function Ra(e) {
1143
- if (!$.value.length)
1144
- return a.value.debug && console.warn("VueUiXyCanvas - There are no series to show."), null;
1145
- const t = $.value.find((l) => l.name === e);
1146
- return t || (a.value.debug && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null);
1147
- }
1148
- function Xt(e) {
1149
- const t = Ra(e);
1150
- t !== null && x.value.includes(t.absoluteIndex) && Fe(t.absoluteIndex);
1151
- }
1152
- function _t(e) {
1153
- const t = Ra(e);
1154
- t !== null && (x.value.includes(t.absoluteIndex) || Fe(t.absoluteIndex));
1155
- }
1156
- const Pe = g(() => $.value.map((e, t) => ({
1157
- ...e,
1158
- name: e.name,
1159
- color: qa(e.color) || ba.value[t] || oe[t] || oe[t % oe.length],
1160
- shape: e.shape || "circle",
1161
- prefix: e.prefix || "",
1162
- suffix: e.suffix || "",
1163
- rounding: e.rounding || 0
1164
- })).map((e) => ({
1165
- ...e,
1166
- opacity: x.value.includes(e.absoluteIndex) ? 0.5 : 1,
1167
- segregate: () => Fe(e.absoluteIndex),
1168
- isSegregated: x.value.includes(e.absoluteIndex)
1169
- }))), Vt = g(() => ({
1170
- cy: "donut-div-legend",
1171
- backgroundColor: a.value.style.chart.legend.backgroundColor,
1172
- color: a.value.style.chart.legend.color,
1173
- fontSize: a.value.style.chart.legend.fontSize,
1174
- paddingBottom: 12,
1175
- fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
1176
- })), Re = g(() => {
1177
- const e = [""].concat(m.value.map((s) => s.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
1178
- let t = [];
1179
- for (let s = 0; s < O.value; s += 1) {
1180
- const i = m.value.map((r) => r.series[s] ?? 0).reduce((r, f) => r + f, 0);
1181
- t.push(
1182
- [
1183
- a.value.style.chart.grid.x.timeLabels.values.slice(u.value.start, u.value.end)[s] ? R?.value?.slice(u.value.start, u.value.end)?.[s]?.text ?? s + 1 : s + 1
1184
- ].concat(
1185
- m.value.map(
1186
- (r) => (r.series[s] ?? 0).toFixed(a.value.table.rounding)
1187
- )
1188
- ).concat((i ?? 0).toFixed(a.value.table.rounding))
1189
- );
1190
- }
1191
- const l = {
1192
- th: {
1193
- backgroundColor: a.value.table.th.backgroundColor,
1194
- color: a.value.table.th.color,
1195
- outline: a.value.table.th.outline
1196
- },
1197
- td: {
1198
- backgroundColor: a.value.table.td.backgroundColor,
1199
- color: a.value.table.td.color,
1200
- outline: a.value.table.td.outline
1201
- },
1202
- breakpoint: a.value.table.responsiveBreakpoint
1203
- }, n = [a.value.table.columnNames.period].concat(m.value.map((s) => s.name)).concat(a.value.table.columnNames.total);
1204
- return { head: e, body: t.slice(0, u.value.end - u.value.start), config: l, colNames: n };
1205
- }), Oa = g(() => {
1206
- if (m.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
1207
- const e = m.value.map((l) => ({
1208
- label: l.name,
1209
- color: l.color,
1210
- type: l.type
1211
- })), t = [];
1212
- for (let l = u.value.start; l < u.value.end; l += 1) {
1213
- const n = [a.value.style.chart.grid.x.timeLabels.values[l] ? R.value[l].text : l + 1];
1214
- m.value.forEach((s) => {
1215
- n.push(Number((s.series[l] || 0).toFixed(a.value.table.rounding)));
1216
- }), t.push(n);
1217
- }
1218
- return { head: e, body: t };
1219
- });
1220
- function je(e = null) {
1221
- const t = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], l = ["", ...Oa.value.head.map((r) => r.label)], n = Oa.value.body, s = t.concat([l]).concat(n), i = cl(s);
1222
- e ? e(i) : dl({ csvContent: i, title: a.value.style.chart.title.text || "vue-ui-xy-canvas" });
1223
- }
1224
- function Yt() {
1225
- return m.value;
1226
- }
1227
- function Da() {
1228
- c.value.showTable = !c.value.showTable;
1229
- }
1230
- function Ea() {
1231
- c.value.showDataLabels = !c.value.showDataLabels;
1232
- }
1233
- function Na() {
1234
- c.value.stacked = !c.value.stacked;
1235
- }
1236
- function Ba() {
1237
- c.value.showTooltip = !c.value.showTooltip;
1238
- }
1239
- const Oe = d(!1);
1240
- function Ze() {
1241
- Oe.value = !Oe.value;
1242
- }
1243
- async function qt({ scale: e = 2 } = {}) {
1244
- if (!_.value) return;
1245
- const { width: t, height: l } = _.value.getBoundingClientRect(), n = t / l, { imageUri: s, base64: i } = await Tl({ domElement: _.value, base64: !0, img: !0, scale: e });
1246
- return {
1247
- imageUri: s,
1248
- base64: i,
1249
- title: a.value.style.chart.title.text,
1250
- width: t,
1251
- height: l,
1252
- aspectRatio: n
1253
- };
1254
- }
1255
- const Le = g(() => {
1256
- const e = a.value.table.useDialog && !a.value.table.show, t = c.value.showTable;
1257
- return {
1258
- component: e ? lt : Fl,
1259
- title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? `: ${a.value.style.chart.title.subtitle.text}` : ""}`,
1260
- props: e ? {
1261
- backgroundColor: a.value.table.th.backgroundColor,
1262
- color: a.value.table.th.color,
1263
- headerColor: a.value.table.th.color,
1264
- headerBg: a.value.table.th.backgroundColor,
1265
- isFullscreen: he.value,
1266
- fullscreenParent: _.value,
1267
- forcedWidth: Math.min(800, window.innerWidth * 0.8),
1268
- isCursorPointer: te.value
1269
- } : {
1270
- hideDetails: !0,
1271
- config: {
1272
- open: t,
1273
- maxHeight: 1e4,
1274
- body: {
1275
- backgroundColor: a.value.style.chart.backgroundColor,
1276
- color: a.value.style.chart.color
1277
- },
1278
- head: {
1279
- backgroundColor: a.value.style.chart.backgroundColor,
1280
- color: a.value.style.chart.color
1281
- }
1282
- }
1283
- }
1284
- };
1285
- });
1286
- E(() => c.value.showTable, (e) => {
1287
- a.value.table.show || (e && a.value.table.useDialog && fe.value ? fe.value.open() : "close" in fe.value && fe.value.close());
1288
- });
1289
- function Ha() {
1290
- c.value.showTable = !1, Xe.value && Xe.value.setTableIconState(!1);
1291
- }
1292
- function Gt(e) {
1293
- if (e?.stage === "start") {
1294
- _e.value = !0;
1295
- return;
1296
- }
1297
- if (e?.stage === "end") {
1298
- _e.value = !1;
1299
- return;
1300
- }
1301
- ga();
1302
- }
1303
- async function Wa() {
1304
- if (Me("copyAlt", {
1305
- config: a.value,
1306
- dataset: m.value
1307
- }), !a.value.userOptions.callbacks.altCopy) {
1308
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1309
- return;
1310
- }
1311
- await Promise.resolve(a.value.userOptions.callbacks.altCopy({
1312
- config: a.value,
1313
- dataset: m.value
1314
- }));
1315
- }
1316
- return Ja({
1317
- getData: Yt,
1318
- getImage: qt,
1319
- generateCsv: je,
1320
- generatePdf: ya,
1321
- generateImage: ga,
1322
- hideSeries: _t,
1323
- showSeries: Xt,
1324
- toggleTable: Da,
1325
- toggleLabels: Ea,
1326
- toggleStack: Na,
1327
- toggleTooltip: Ba,
1328
- toggleAnnotator: Ze,
1329
- toggleFullscreen: pa,
1330
- copyAlt: Wa
1331
- }), (e, t) => (F(), Ee("div", {
1332
- style: ie(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}; background:${a.value.style.chart.backgroundColor};`),
1333
- ref_key: "xy",
1334
- ref: _,
1335
- id: `xy_canvas_${ae.value}`,
1336
- class: Jt(`vue-data-ui-component vue-ui-xy-canvas ${he.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1337
- onMouseenter: vt,
1338
- onMouseleave: ct
1339
- }, [
1340
- a.value.style.chart.title.text ? (F(), Ee("div", {
1341
- key: 0,
1342
- ref_key: "chartTitle",
1343
- ref: sa,
1344
- style: ie(`width:100%;background:${a.value.style.chart.backgroundColor};`)
1345
- }, [
1346
- (F(), U(Al, {
1347
- key: `title_${He.value}`,
1348
- config: {
1349
- title: {
1350
- cy: "xy-canvas-title",
1351
- ...a.value.style.chart.title
1352
- },
1353
- subtitle: {
1354
- cy: "xy-canvas-subtitle",
1355
- ...a.value.style.chart.title.subtitle
1356
- }
1357
- }
1358
- }, null, 8, ["config"]))
1359
- ], 4)) : X("", !0),
1360
- K("div", {
1361
- id: `legend-top-${ae.value}`
1362
- }, null, 8, El),
1363
- a.value.userOptions.show && Y.value && (C(da) || C(Ye)) ? (F(), U(C(at), {
1364
- ref_key: "userOptionsRef",
1365
- ref: Xe,
1366
- key: `user_option_${ua.value}`,
1367
- backgroundColor: a.value.style.chart.backgroundColor,
1368
- color: a.value.style.chart.color,
1369
- isPrinting: C(fa),
1370
- isImaging: C(ma),
1371
- uid: ae.value,
1372
- hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
1373
- hasPdf: a.value.userOptions.buttons.pdf,
1374
- hasImg: a.value.userOptions.buttons.img,
1375
- hasXls: a.value.userOptions.buttons.csv,
1376
- hasLabel: a.value.userOptions.buttons.labels,
1377
- hasStack: la.dataset.length > 1 && a.value.userOptions.buttons.stack,
1378
- hasFullscreen: a.value.userOptions.buttons.fullscreen,
1379
- hasAltCopy: a.value.userOptions.buttons.altCopy,
1380
- hasTable: u.value.end - u.value.start <= 730 && a.value.userOptions.buttons.table,
1381
- isFullscreen: he.value,
1382
- isTooltip: c.value.showTooltip,
1383
- isStacked: c.value.stacked,
1384
- titles: { ...a.value.userOptions.buttonTitles },
1385
- chartElement: _.value,
1386
- position: a.value.userOptions.position,
1387
- hasAnnotator: a.value.userOptions.buttons.annotator,
1388
- isAnnotation: Oe.value,
1389
- callbacks: a.value.userOptions.callbacks,
1390
- printScale: a.value.userOptions.print.scale,
1391
- tableDialog: a.value.table.useDialog,
1392
- isCursorPointer: te.value,
1393
- onToggleFullscreen: pa,
1394
- onGeneratePdf: C(ya),
1395
- onGenerateCsv: je,
1396
- onGenerateImage: Gt,
1397
- onToggleTable: Da,
1398
- onToggleLabels: Ea,
1399
- onToggleStack: Na,
1400
- onToggleTooltip: Ba,
1401
- onToggleAnnotator: Ze,
1402
- onCopyAlt: Wa,
1403
- style: ie({
1404
- visibility: C(da) ? C(Ye) ? "visible" : "hidden" : "visible"
1405
- })
1406
- }, Xa({ _: 2 }, [
1407
- e.$slots.menuIcon ? {
1408
- name: "menuIcon",
1409
- fn: b(({ isOpen: l, color: n }) => [
1410
- k(e.$slots, "menuIcon", Q(ee({ isOpen: l, color: n })), void 0, !0)
1411
- ]),
1412
- key: "0"
1413
- } : void 0,
1414
- e.$slots.optionTooltip ? {
1415
- name: "optionTooltip",
1416
- fn: b(() => [
1417
- k(e.$slots, "optionTooltip", {}, void 0, !0)
1418
- ]),
1419
- key: "1"
1420
- } : void 0,
1421
- e.$slots.optionPdf ? {
1422
- name: "optionPdf",
1423
- fn: b(() => [
1424
- k(e.$slots, "optionPdf", {}, void 0, !0)
1425
- ]),
1426
- key: "2"
1427
- } : void 0,
1428
- e.$slots.optionCsv ? {
1429
- name: "optionCsv",
1430
- fn: b(() => [
1431
- k(e.$slots, "optionCsv", {}, void 0, !0)
1432
- ]),
1433
- key: "3"
1434
- } : void 0,
1435
- e.$slots.optionImg ? {
1436
- name: "optionImg",
1437
- fn: b(() => [
1438
- k(e.$slots, "optionImg", {}, void 0, !0)
1439
- ]),
1440
- key: "4"
1441
- } : void 0,
1442
- e.$slots.optionTable ? {
1443
- name: "optionTable",
1444
- fn: b(() => [
1445
- k(e.$slots, "optionTable", {}, void 0, !0)
1446
- ]),
1447
- key: "5"
1448
- } : void 0,
1449
- e.$slots.optionLabels ? {
1450
- name: "optionLabels",
1451
- fn: b(() => [
1452
- k(e.$slots, "optionLabels", {}, void 0, !0)
1453
- ]),
1454
- key: "6"
1455
- } : void 0,
1456
- e.$slots.optionStack ? {
1457
- name: "optionStack",
1458
- fn: b(() => [
1459
- k(e.$slots, "optionStack", {}, void 0, !0)
1460
- ]),
1461
- key: "7"
1462
- } : void 0,
1463
- e.$slots.optionFullscreen ? {
1464
- name: "optionFullscreen",
1465
- fn: b(({ toggleFullscreen: l, isFullscreen: n }) => [
1466
- k(e.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
1467
- ]),
1468
- key: "8"
1469
- } : void 0,
1470
- e.$slots.optionAnnotator ? {
1471
- name: "optionAnnotator",
1472
- fn: b(({ toggleAnnotator: l, isAnnotator: n }) => [
1473
- k(e.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: l, isAnnotator: n })), void 0, !0)
1474
- ]),
1475
- key: "9"
1476
- } : void 0,
1477
- e.$slots.optionAltCopy ? {
1478
- name: "optionAltCopy",
1479
- fn: b(({ altCopy: l }) => [
1480
- k(e.$slots, "optionAltCopy", Q(ee({ altCopy: l })), void 0, !0)
1481
- ]),
1482
- key: "10"
1483
- } : void 0
1484
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasAltCopy", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : X("", !0),
1485
- K("div", {
1486
- class: "vue-ui-xy-canvas",
1487
- style: ie(`position: relative; aspect-ratio: ${ha.value}`),
1488
- ref_key: "container",
1489
- ref: ue
1490
- }, [
1491
- K("canvas", {
1492
- ref_key: "canvas",
1493
- ref: z,
1494
- style: { width: "100%", height: "100%" },
1495
- onMousemove: t[0] || (t[0] = (l) => Bt(l)),
1496
- onMouseleave: Wt
1497
- }, null, 544),
1498
- k(e.$slots, "skeleton", {}, () => [
1499
- C($e) ? (F(), U(Cl, { key: 0 })) : X("", !0)
1500
- ], !0),
1501
- _a(C(Qa), {
1502
- teleportTo: a.value.style.chart.tooltip.teleportTo,
1503
- show: c.value.showTooltip && de.value,
1504
- backgroundColor: a.value.style.chart.tooltip.backgroundColor,
1505
- color: a.value.style.chart.tooltip.color,
1506
- fontSize: a.value.style.chart.tooltip.fontSize,
1507
- borderRadius: a.value.style.chart.tooltip.borderRadius,
1508
- borderColor: a.value.style.chart.tooltip.borderColor,
1509
- borderWidth: a.value.style.chart.tooltip.borderWidth,
1510
- position: a.value.style.chart.tooltip.position,
1511
- offsetY: a.value.style.chart.tooltip.offsetY,
1512
- parent: C(z),
1513
- content: Se.value,
1514
- isFullscreen: he.value,
1515
- backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
1516
- isCustom: C(Ga)(a.value.style.chart.tooltip.customFormat),
1517
- smooth: a.value.style.chart.tooltip.smooth,
1518
- backdropFilter: a.value.style.chart.tooltip.backdropFilter,
1519
- smoothForce: a.value.style.chart.tooltip.smoothForce,
1520
- smoothSnapThreshold: a.value.style.chart.tooltip.smoothSnapThreshold
1521
- }, {
1522
- "tooltip-before": b(() => [
1523
- k(e.$slots, "tooltip-before", Q(ee({ ...oa.value })), void 0, !0)
1524
- ]),
1525
- "tooltip-after": b(() => [
1526
- k(e.$slots, "tooltip-after", Q(ee({ ...oa.value })), void 0, !0)
1527
- ]),
1528
- _: 3
1529
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"])
1530
- ], 4),
1531
- a.value.style.chart.zoom.show && O.value > 6 && Y.value && va.value && !C($e) ? (F(), U(Pl, {
1532
- key: 2,
1533
- ref_key: "chartSlicer",
1534
- ref: j,
1535
- allMinimaps: bt.value,
1536
- background: a.value.style.chart.zoom.color,
1537
- borderColor: a.value.style.chart.backgroundColor,
1538
- customFormat: a.value.style.chart.zoom.customFormat,
1539
- cutNullValues: Ae.value,
1540
- enableRangeHandles: a.value.style.chart.zoom.enableRangeHandles,
1541
- enableSelectionDrag: a.value.style.chart.zoom.enableSelectionDrag,
1542
- end: u.value.end,
1543
- focusOnDrag: a.value.style.chart.zoom.focusOnDrag,
1544
- focusRangeRatio: a.value.style.chart.zoom.focusRangeRatio,
1545
- fontSize: a.value.style.chart.zoom.fontSize,
1546
- immediate: !a.value.style.chart.zoom.preview.enable,
1547
- inputColor: a.value.style.chart.zoom.color,
1548
- isPreview: Lt.value,
1549
- labelLeft: a.value.style.chart.grid.x.timeLabels.values[u.value.start] ? R.value[u.value.start]?.text : "",
1550
- labelRight: a.value.style.chart.grid.x.timeLabels.values[u.value.end - 1] ? R.value[u.value.end - 1]?.text : "",
1551
- max: O.value,
1552
- min: 0,
1553
- minimap: pt.value,
1554
- minimapCompact: a.value.style.chart.zoom.minimap.compact,
1555
- minimapFrameColor: a.value.style.chart.zoom.minimap.frameColor,
1556
- minimapIndicatorColor: a.value.style.chart.zoom.minimap.indicatorColor,
1557
- minimapLineColor: a.value.style.chart.zoom.minimap.lineColor,
1558
- minimapMerged: a.value.style.chart.zoom.minimap.merged,
1559
- minimapSelectedColor: a.value.style.chart.zoom.minimap.selectedColor,
1560
- minimapSelectedColorOpacity: a.value.style.chart.zoom.minimap.selectedColorOpacity,
1561
- minimapSelectedIndex: h.value,
1562
- minimapSelectionRadius: a.value.style.chart.zoom.minimap.selectionRadius,
1563
- preciseLabels: Aa.value?.length ? Aa.value : R.value,
1564
- refreshEndPoint: a.value.style.chart.zoom.endIndex !== null ? a.value.style.chart.zoom.endIndex + 1 : O.value,
1565
- refreshStartPoint: a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex : 0,
1566
- selectColor: a.value.style.chart.zoom.highlightColor,
1567
- selectedSeries: $.value,
1568
- smoothMinimap: a.value.style.chart.zoom.minimap.smooth,
1569
- start: u.value.start,
1570
- timeLabels: R.value,
1571
- usePreciseLabels: a.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !a.value.style.chart.zoom.useDefaultFormat,
1572
- textColor: a.value.style.chart.color,
1573
- useResetSlot: a.value.style.chart.zoom.useResetSlot,
1574
- valueEnd: u.value.end,
1575
- valueStart: u.value.start,
1576
- verticalHandles: a.value.style.chart.zoom.minimap.verticalHandles,
1577
- maxWidth: a.value.style.chart.zoom.maxWidth,
1578
- additionalMinimapHeight: a.value.style.chart.zoom.minimap.additionalHeight,
1579
- handleType: a.value.style.chart.zoom.minimap.handleType,
1580
- handleIconColor: a.value.style.chart.zoom.minimap.handleIconColor,
1581
- handleBorderWidth: a.value.style.chart.zoom.minimap.handleBorderWidth,
1582
- handleBorderColor: a.value.style.chart.zoom.minimap.handleBorderColor,
1583
- handleFill: a.value.style.chart.zoom.minimap.handleFill,
1584
- handleWidth: a.value.style.chart.zoom.minimap.handleWidth,
1585
- onFutureEnd: t[1] || (t[1] = (l) => ka("end", l)),
1586
- onFutureStart: t[2] || (t[2] = (l) => ka("start", l)),
1587
- onReset: pe,
1588
- onTrapMouse: dt,
1589
- "onUpdate:end": kt,
1590
- "onUpdate:start": Ct
1591
- }, {
1592
- "reset-action": b(({ reset: l }) => [
1593
- k(e.$slots, "reset-action", Q(ee({ reset: l })), void 0, !0)
1594
- ]),
1595
- _: 3
1596
- }, 8, ["allMinimaps", "background", "borderColor", "customFormat", "cutNullValues", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapLineColor", "minimapMerged", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapSelectionRadius", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "smoothMinimap", "start", "timeLabels", "usePreciseLabels", "textColor", "useResetSlot", "valueEnd", "valueStart", "verticalHandles", "maxWidth", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth"])) : X("", !0),
1597
- K("div", {
1598
- id: `legend-bottom-${ae.value}`
1599
- }, null, 8, Nl),
1600
- ia.value ? (F(), U(Kt, {
1601
- key: 3,
1602
- to: a.value.style.chart.legend.position === "top" ? `#legend-top-${ae.value}` : `#legend-bottom-${ae.value}`
1603
- }, [
1604
- K("div", {
1605
- ref_key: "chartLegend",
1606
- ref: na
1607
- }, [
1608
- a.value.style.chart.legend.show && Y.value ? (F(), U($l, {
1609
- legendSet: Pe.value,
1610
- config: Vt.value,
1611
- key: `legend_${Ue.value}`,
1612
- isCursorPointer: te.value,
1613
- onClickMarker: t[3] || (t[3] = ({ i: l }) => Fe(l))
1614
- }, {
1615
- item: b(({ legend: l, index: n }) => [
1616
- K("div", {
1617
- onClick: (s) => l.segregate(),
1618
- style: ie(`opacity:${x.value.includes(n) ? 0.5 : 1}`)
1619
- }, ea(l.name), 13, Bl)
1620
- ]),
1621
- legendToggle: b(() => [
1622
- Pe.value.length > 2 && a.value.style.chart.legend.selectAllToggle.show && !C($e) ? (F(), U(Rl, {
1623
- key: 0,
1624
- backgroundColor: a.value.style.chart.legend.selectAllToggle.backgroundColor,
1625
- color: a.value.style.chart.legend.selectAllToggle.color,
1626
- fontSize: a.value.style.chart.legend.fontSize,
1627
- checked: x.value.length > 0,
1628
- isCursorPointer: te.value,
1629
- onToggle: Ut
1630
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : X("", !0)
1631
- ]),
1632
- _: 1
1633
- }, 8, ["legendSet", "config", "isCursorPointer"])) : k(e.$slots, "legend", {
1634
- key: 1,
1635
- legend: Pe.value
1636
- }, void 0, !0)
1637
- ], 512)
1638
- ], 8, ["to"])) : X("", !0),
1639
- e.$slots.watermark ? (F(), Ee("div", Hl, [
1640
- k(e.$slots, "watermark", Q(ee({ isPrinting: C(fa) || C(ma) || _e.value })), void 0, !0)
1641
- ])) : X("", !0),
1642
- e.$slots.source ? (F(), Ee("div", {
1643
- key: 5,
1644
- ref_key: "source",
1645
- ref: ra,
1646
- dir: "auto"
1647
- }, [
1648
- k(e.$slots, "source", {}, void 0, !0)
1649
- ], 512)) : X("", !0),
1650
- Y.value && a.value.userOptions.buttons.table ? (F(), U(Qt(Le.value.component), el({ key: 6 }, Le.value.props, {
1651
- ref_key: "tableUnit",
1652
- ref: fe,
1653
- onClose: Ha
1654
- }), Xa({
1655
- content: b(() => [
1656
- (F(), U(C(et), {
1657
- key: `table_${We.value}`,
1658
- colNames: Re.value.colNames,
1659
- head: Re.value.head,
1660
- body: Re.value.body,
1661
- config: Re.value.config,
1662
- title: a.value.table.useDialog ? "" : Le.value.title,
1663
- withCloseButton: !a.value.table.useDialog,
1664
- isCursorPointer: te.value,
1665
- onClose: Ha
1666
- }, {
1667
- th: b(({ th: l }) => [
1668
- K("div", { innerHTML: l }, null, 8, Wl)
1669
- ]),
1670
- td: b(({ td: l }) => [
1671
- Va(ea(l), 1)
1672
- ]),
1673
- _: 1
1674
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
1675
- ]),
1676
- _: 2
1677
- }, [
1678
- a.value.table.useDialog ? {
1679
- name: "title",
1680
- fn: b(() => [
1681
- Va(ea(Le.value.title), 1)
1682
- ]),
1683
- key: "0"
1684
- } : void 0,
1685
- a.value.table.useDialog ? {
1686
- name: "actions",
1687
- fn: b(() => [
1688
- K("button", {
1689
- tabindex: "0",
1690
- class: "vue-ui-user-options-button",
1691
- onClick: t[4] || (t[4] = (l) => je(a.value.userOptions.callbacks.csv)),
1692
- style: ie({ cursor: te.value ? "pointer" : "default" })
1693
- }, [
1694
- _a(Il, {
1695
- name: "fileCsv",
1696
- stroke: Le.value.props.color
1697
- }, null, 8, ["stroke"])
1698
- ], 4)
1699
- ]),
1700
- key: "1"
1701
- } : void 0
1702
- ]), 1040)) : X("", !0),
1703
- a.value.userOptions.buttons.annotator && m.value.length ? (F(), U(C(tt), {
1704
- key: 7,
1705
- parent: _.value,
1706
- backgroundColor: a.value.style.chart.backgroundColor,
1707
- color: a.value.style.chart.color,
1708
- active: Oe.value,
1709
- isCursorPointer: te.value,
1710
- onClose: Ze
1711
- }, null, 8, ["parent", "backgroundColor", "color", "active", "isCursorPointer"])) : X("", !0)
1712
- ], 46, Dl));
1713
- }
1714
- }, io = /* @__PURE__ */ Ol(Ul, [["__scopeId", "data-v-e0eee1ba"]]);
1715
- export {
1716
- io as default
1717
- };