vue-data-ui 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/{Arrow-DLi6NnGD.js → Arrow-CRe_nKB4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CVGErydD.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
  3. package/dist/{BaseIcon-eZbszQrv.js → BaseIcon-B5KaGWWC.js} +1 -1
  4. package/dist/{ColorPicker-BoPM4Ejg.js → ColorPicker-BMztHpBp.js} +10 -10
  5. package/dist/{DataTable-yAMEyP6y.js → DataTable-DOx3zgih.js} +2 -2
  6. package/dist/{Legend-By4rru90.js → Legend-C8u37J42.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-C7QqIewT.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
  8. package/dist/{PackageVersion-r-Q1R3nV.js → PackageVersion-DyDViSOy.js} +1 -1
  9. package/dist/{PenAndPaper-Bo-lMUik.js → PenAndPaper-Dj2diYr0.js} +3 -3
  10. package/dist/{Shape-BceHSLHf.js → Shape-BhNvlGIN.js} +1 -1
  11. package/dist/{Slicer-Znzt0gSE.js → Slicer-BHgEsIBU.js} +111 -111
  12. package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
  13. package/dist/{SparkTooltip--YwqrrgZ.js → SparkTooltip-CL3cNRQ_.js} +1 -1
  14. package/dist/{Title-Camz1Lce.js → Title-CFmv95In.js} +1 -1
  15. package/dist/{Tooltip-VOcQEHa4.js → Tooltip-Cs4v8OnI.js} +1 -1
  16. package/dist/{UserOptions-CSja1SGU.js → UserOptions-C0YT60JN.js} +2 -2
  17. package/dist/components/arrow.js +1 -1
  18. package/dist/components/vue-ui-3d-bar.js +1 -1
  19. package/dist/components/vue-ui-accordion.js +1 -1
  20. package/dist/components/vue-ui-age-pyramid.js +1 -1
  21. package/dist/components/vue-ui-annotator.js +1 -1
  22. package/dist/components/vue-ui-bullet.js +1 -1
  23. package/dist/components/vue-ui-candlestick.js +1 -1
  24. package/dist/components/vue-ui-carousel-table.js +1 -1
  25. package/dist/components/vue-ui-chestnut.js +1 -1
  26. package/dist/components/vue-ui-chord.js +1 -1
  27. package/dist/components/vue-ui-circle-pack.js +1 -1
  28. package/dist/components/vue-ui-cursor.js +1 -1
  29. package/dist/components/vue-ui-dashboard.js +1 -1
  30. package/dist/components/vue-ui-digits.js +1 -1
  31. package/dist/components/vue-ui-donut-evolution.js +1 -1
  32. package/dist/components/vue-ui-donut.js +1 -1
  33. package/dist/components/vue-ui-dumbbell.js +1 -1
  34. package/dist/components/vue-ui-flow.js +1 -1
  35. package/dist/components/vue-ui-funnel.js +1 -1
  36. package/dist/components/vue-ui-galaxy.js +1 -1
  37. package/dist/components/vue-ui-gauge.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-heatmap.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-strip-plot.js +1 -1
  68. package/dist/components/vue-ui-table-heatmap.js +1 -1
  69. package/dist/components/vue-ui-table-sparkline.js +1 -1
  70. package/dist/components/vue-ui-table.js +1 -1
  71. package/dist/components/vue-ui-thermometer.js +1 -1
  72. package/dist/components/vue-ui-timer.js +1 -1
  73. package/dist/components/vue-ui-tiremarks.js +1 -1
  74. package/dist/components/vue-ui-treemap.js +1 -1
  75. package/dist/components/vue-ui-vertical-bar.js +1 -1
  76. package/dist/components/vue-ui-waffle.js +1 -1
  77. package/dist/components/vue-ui-wheel.js +1 -1
  78. package/dist/components/vue-ui-word-cloud.js +1 -1
  79. package/dist/components/vue-ui-world.js +1 -1
  80. package/dist/components/vue-ui-xy-canvas.js +1 -1
  81. package/dist/components/vue-ui-xy.js +1 -1
  82. package/dist/{dom-to-png-DxyZSvDx.js → dom-to-png-xQ7LXrxp.js} +1 -1
  83. package/dist/{img-J2dLIr8Y.js → img-CFY3JivG.js} +1 -1
  84. package/dist/{lib-CEjkWSLj.js → lib-BcBZIm6u.js} +439 -395
  85. package/dist/{pdf-anN8VbM7.js → pdf-O34i6EQX.js} +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/types/vue-data-ui.d.ts +82 -8
  88. package/dist/{useAutoSizeLabelsInsideViewbox-CovTrBjm.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
  89. package/dist/{useNestedProp-Ce3PwN8T.js → useNestedProp-B7CiTRDS.js} +327 -240
  90. package/dist/{usePrinter-DJ1iH-F_.js → usePrinter-C1GiglOH.js} +2 -2
  91. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  92. package/dist/{vue-data-ui-BFdGl7rL.js → vue-data-ui-D7Tgakts.js} +64 -64
  93. package/dist/vue-data-ui.js +100 -100
  94. package/dist/{vue-ui-3d-bar-kzlIaqHU.js → vue-ui-3d-bar-H_4pqH3h.js} +56 -56
  95. package/dist/{vue-ui-accordion-VTP418mC.js → vue-ui-accordion-BKkTS12x.js} +3 -3
  96. package/dist/{vue-ui-age-pyramid-YFzQ15k1.js → vue-ui-age-pyramid-BGzYbrts.js} +62 -55
  97. package/dist/{vue-ui-annotator-CmwDyy9m.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
  98. package/dist/{vue-ui-bullet-DdjpiM-T.js → vue-ui-bullet-Cf4Uzhez.js} +7 -7
  99. package/dist/vue-ui-candlestick-DfbP87Cr.js +1334 -0
  100. package/dist/{vue-ui-carousel-table-CRI_iPLn.js → vue-ui-carousel-table-0z6eLg_I.js} +29 -29
  101. package/dist/{vue-ui-chestnut-YrEA5Gq3.js → vue-ui-chestnut-BcQFRaXx.js} +70 -70
  102. package/dist/{vue-ui-chord-D_2DdvpZ.js → vue-ui-chord-YYE07iRP.js} +35 -35
  103. package/dist/{vue-ui-circle-pack-xm9-OOAR.js → vue-ui-circle-pack-BRSqhjxm.js} +47 -47
  104. package/dist/{vue-ui-cursor-Dt8Zzw22.js → vue-ui-cursor-iuati4v1.js} +2 -2
  105. package/dist/{vue-ui-dashboard-29ZuFoLn.js → vue-ui-dashboard-BpeLteeH.js} +67 -67
  106. package/dist/{vue-ui-digits-nKPRJ9Vz.js → vue-ui-digits-eYxf3UFN.js} +2 -2
  107. package/dist/{vue-ui-donut-BQptfVfE.js → vue-ui-donut-Yw81BFf2.js} +189 -189
  108. package/dist/{vue-ui-donut-evolution-fiqngEFW.js → vue-ui-donut-evolution-k3xCwZYv.js} +145 -138
  109. package/dist/{vue-ui-dumbbell-Cw45EBO0.js → vue-ui-dumbbell-DMPndU1O.js} +82 -75
  110. package/dist/{vue-ui-flow-DPu9BjPy.js → vue-ui-flow-D-W3VQTv.js} +75 -75
  111. package/dist/{vue-ui-funnel-CtlDuNjO.js → vue-ui-funnel-q-b-LqXG.js} +63 -63
  112. package/dist/{vue-ui-galaxy-BiVjoNHW.js → vue-ui-galaxy-4pueJOcI.js} +62 -62
  113. package/dist/{vue-ui-gauge-CoM6Q3Nb.js → vue-ui-gauge-APtv_CvA.js} +58 -58
  114. package/dist/{vue-ui-gizmo-DXG8dS5u.js → vue-ui-gizmo-BH0MvhIV.js} +3 -3
  115. package/dist/{vue-ui-heatmap-D6n8AnCc.js → vue-ui-heatmap-BBdrkhmg.js} +465 -435
  116. package/dist/{vue-ui-history-plot-C8WMHda_.js → vue-ui-history-plot-DL5ioFH4.js} +115 -108
  117. package/dist/{vue-ui-kpi-Dphnwumo.js → vue-ui-kpi-N8s0i48S.js} +3 -3
  118. package/dist/{vue-ui-mini-loader-DFk9GZ5V.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
  119. package/dist/{vue-ui-molecule-DC4_vXt_.js → vue-ui-molecule-DnjRfc4-.js} +102 -102
  120. package/dist/{vue-ui-mood-radar-BgT5wMS0.js → vue-ui-mood-radar-9aAC_ake.js} +28 -28
  121. package/dist/{vue-ui-nested-donuts-D2gSqe1f.js → vue-ui-nested-donuts-BnVXn9Qa.js} +60 -60
  122. package/dist/{vue-ui-onion-CEbv2ii4.js → vue-ui-onion-DbanwrFr.js} +46 -46
  123. package/dist/{vue-ui-parallel-coordinate-plot-budrvcwU.js → vue-ui-parallel-coordinate-plot-CtlpCJ97.js} +88 -81
  124. package/dist/{vue-ui-quadrant-PpymeiXe.js → vue-ui-quadrant-BVffm_0o.js} +8 -8
  125. package/dist/{vue-ui-quick-chart-k6mjTD56.js → vue-ui-quick-chart-C4Uc3DRH.js} +280 -273
  126. package/dist/{vue-ui-radar-C5NvYMnv.js → vue-ui-radar-C-MSV1ZJ.js} +69 -69
  127. package/dist/{vue-ui-rating-eKlTJch9.js → vue-ui-rating-fR2WRHYO.js} +2 -2
  128. package/dist/{vue-ui-relation-circle-Df33aaUT.js → vue-ui-relation-circle-4MPxPkAi.js} +31 -31
  129. package/dist/{vue-ui-ridgeline-BTw-37RS.js → vue-ui-ridgeline-B1T10gWF.js} +118 -111
  130. package/dist/{vue-ui-rings-C_s9xOtZ.js → vue-ui-rings-G0bYxlue.js} +50 -50
  131. package/dist/{vue-ui-scatter-Jd8bQ0S5.js → vue-ui-scatter-DqZwonPL.js} +100 -100
  132. package/dist/{vue-ui-skeleton-Ce7H57o7.js → vue-ui-skeleton-C-IKc-3B.js} +3 -3
  133. package/dist/{vue-ui-smiley-C4mhT7ZV.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
  134. package/dist/{vue-ui-spark-trend-DQy4iSO7.js → vue-ui-spark-trend-8vV7SyrA.js} +18 -18
  135. package/dist/{vue-ui-sparkbar-CUFTHql0.js → vue-ui-sparkbar-BsWBXGuQ.js} +3 -3
  136. package/dist/{vue-ui-sparkgauge-CcykuBps.js → vue-ui-sparkgauge-B9-iRqNC.js} +6 -6
  137. package/dist/{vue-ui-sparkhistogram-CyGvYpYn.js → vue-ui-sparkhistogram-CV4PH2vQ.js} +4 -4
  138. package/dist/{vue-ui-sparkline-CLWJM6hA.js → vue-ui-sparkline-DScNHLXj.js} +23 -23
  139. package/dist/{vue-ui-sparkstackbar-Cln1pduE.js → vue-ui-sparkstackbar-CXPJToNY.js} +17 -17
  140. package/dist/vue-ui-stackbar-94piqh7z.js +1695 -0
  141. package/dist/{vue-ui-strip-plot-C4U0fT5D.js → vue-ui-strip-plot-CA4GL9dj.js} +144 -137
  142. package/dist/{vue-ui-table-DpdP3PDq.js → vue-ui-table-BAbQsJGk.js} +18 -18
  143. package/dist/{vue-ui-table-heatmap-J29d8nds.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
  144. package/dist/{vue-ui-table-sparkline-Chf5YY4A.js → vue-ui-table-sparkline-1KrHuOle.js} +28 -28
  145. package/dist/{vue-ui-thermometer-D6RmaNE6.js → vue-ui-thermometer-DrCAdNyW.js} +22 -22
  146. package/dist/{vue-ui-timer-C5E1kJRt.js → vue-ui-timer-Cj677c6_.js} +29 -29
  147. package/dist/{vue-ui-tiremarks-D0erVBnj.js → vue-ui-tiremarks-O5LGA_1a.js} +14 -14
  148. package/dist/{vue-ui-treemap-K8FYxuYz.js → vue-ui-treemap-BVe_Fft6.js} +78 -78
  149. package/dist/{vue-ui-vertical-bar-BA3OY8Sh.js → vue-ui-vertical-bar-D8oCUku1.js} +94 -94
  150. package/dist/{vue-ui-waffle-CgLgPuro.js → vue-ui-waffle-C39XL2GH.js} +68 -68
  151. package/dist/{vue-ui-wheel-C_cOUhCs.js → vue-ui-wheel-BEpyCUNj.js} +21 -21
  152. package/dist/{vue-ui-word-cloud-uvHNOIpN.js → vue-ui-word-cloud-Dlp9LghX.js} +35 -35
  153. package/dist/{vue-ui-world-DmeNMwpX.js → vue-ui-world-BS8BCZJ3.js} +6 -6
  154. package/dist/vue-ui-xy-D3LqMzve.js +3375 -0
  155. package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
  156. package/package.json +1 -1
  157. package/dist/useResizeObserverEffect-DfnWps4W.js +0 -109
  158. package/dist/vue-ui-candlestick-x9U5Ni0N.js +0 -1066
  159. package/dist/vue-ui-stackbar-DIUil9DO.js +0 -1442
  160. package/dist/vue-ui-xy-canvas-BQKR36bd.js +0 -1305
  161. package/dist/vue-ui-xy-tWE4H5ij.js +0 -4520
@@ -1,1066 +0,0 @@
1
- import { defineAsyncComponent as R, computed as h, ref as r, toRefs as Gt, watch as te, shallowRef as Qe, onMounted as Xt, onBeforeUnmount as Ze, nextTick as Ae, createElementBlock as i, openBlock as s, unref as u, normalizeStyle as Ce, normalizeClass as T, createBlock as N, createCommentVNode as p, createElementVNode as y, createVNode as _e, createSlots as et, withCtx as m, renderSlot as x, normalizeProps as B, guardReactiveProps as E, Fragment as V, renderList as M, toDisplayString as Y, resolveDynamicComponent as jt, mergeProps as Yt, createTextVNode as tt } from "vue";
2
- import { c as qt, t as Jt, B as le, o as lt, f as U, C as Kt, q, d as L, X as Qt, i as ae, s as Zt, D as at, x as el, y as tl, z as ll, A as al } from "./lib-CEjkWSLj.js";
3
- import { t as ot, u as ol } from "./useResponsive-DfdjqQps.js";
4
- import { u as sl, a as st } from "./useNestedProp-Ce3PwN8T.js";
5
- import { u as ul } from "./usePrinter-DJ1iH-F_.js";
6
- import { u as il, B as nl } from "./BaseScanner-BgWxam9d.js";
7
- import { u as rl } from "./useSvgExport-DrjCWun4.js";
8
- import { u as vl } from "./useTimeLabels-BGFjWgrv.js";
9
- import { u as dl } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as cl } from "./useChartAccessibility-9icAAmYg.js";
11
- import { u as yl, a as hl } from "./useResizeObserverEffect-DfnWps4W.js";
12
- import fl from "./img-J2dLIr8Y.js";
13
- import gl from "./Title-Camz1Lce.js";
14
- import { t as pl } from "./themes-Dw-dDudK.js";
15
- import { S as bl } from "./Slicer-Znzt0gSE.js";
16
- import { _ as ml } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- const xl = ["id"], kl = ["xmlns", "aria-label", "viewBox"], wl = ["x", "y", "width", "height"], Al = { key: 1 }, Cl = ["id"], _l = ["stop-color"], zl = ["stop-color"], $l = ["stop-color"], Sl = ["id"], Tl = ["stop-color"], Ll = ["stop-color"], Il = ["stop-color"], Rl = { key: 0 }, Fl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pl = ["x", "y", "font-size", "fill", "font-weight"], Nl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Bl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], El = ["x", "y", "width", "height", "fill", "rx"], Vl = { key: 0 }, Ml = ["cx", "cy", "r", "fill"], Ul = ["cx", "cy", "r", "fill"], Wl = { key: 1 }, Hl = ["x", "y", "width", "height", "rx", "fill"], Gl = ["x", "y", "width", "height", "fill", "rx"], Xl = ["x", "y", "height", "width", "fill", "rx"], jl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Yl = ["x", "y", "height", "width", "fill", "onMouseover", "onMouseleave", "onClick"], ql = {
18
- key: 4,
19
- class: "vue-data-ui-watermark"
20
- }, Jl = ["innerHTML"], Kl = {
21
- __name: "vue-ui-candlestick",
22
- props: {
23
- config: {
24
- type: Object,
25
- default() {
26
- return {};
27
- }
28
- },
29
- dataset: {
30
- type: Array,
31
- default() {
32
- return [];
33
- }
34
- }
35
- },
36
- setup(ut, { expose: it }) {
37
- const nt = R(() => import("./BaseIcon-eZbszQrv.js")), rt = R(() => import("./Tooltip-VOcQEHa4.js")), vt = R(() => import("./vue-ui-accordion-VTP418mC.js")), dt = R(() => import("./DataTable-yAMEyP6y.js")), ct = R(() => import("./PenAndPaper-Bo-lMUik.js")), yt = R(() => import("./UserOptions-CSja1SGU.js")), ht = R(() => import("./PackageVersion-r-Q1R3nV.js")), ft = R(() => import("./BaseDraggableDialog-CVGErydD.js")), { vue_ui_candlestick: gt } = sl(), f = ut, oe = h(() => !!f.dataset && f.dataset.length), z = r(!1), se = r(null), A = r(qt()), ue = r(!1), ie = r(""), ne = r(void 0), ze = r(0), $ = r(null), $e = r(null), Se = r(null), Te = r(null), Le = r(null), Ie = r(null), J = r(0), Re = r(0), Fe = r(0), re = r(null), H = r(null), G = r(null), ve = r(null), e = r(he()), { loading: S, FINAL_DATASET: C, manualLoading: de } = il({
38
- ...Gt(f),
39
- FINAL_CONFIG: e,
40
- prepareConfig: he,
41
- callback: () => {
42
- Promise.resolve().then(async () => {
43
- await be();
44
- });
45
- },
46
- skeletonDataset: [
47
- [17040672e5, 10, 20, 2, 10, 30],
48
- [17067456e5, 10, 30, 5, 20, 50],
49
- [17092512e5, 20, 50, 10, 30, 80],
50
- [17119296e5, 30, 80, 20, 50, 130],
51
- [17145216e5, 50, 130, 30, 100, 210],
52
- [17172e8, 80, 210, 50, 150, 340],
53
- [1719792e6, 130, 340, 80, 280, 550],
54
- [17224704e5, 210, 550, 130, 450, 890],
55
- [17251488e5, 340, 890, 210, 750, 1440],
56
- [17277408e5, 550, 1440, 340, 1230, 2330],
57
- [17304192e5, 890, 2330, 550, 1950, 3770],
58
- [17330112e5, 1440, 3770, 890, 3200, 5100]
59
- ],
60
- skeletonConfig: Jt({
61
- defaultConfig: e.value,
62
- userConfig: {
63
- useCssAnimation: !1,
64
- userOptions: { show: !1 },
65
- table: { show: !1 },
66
- style: {
67
- backgroundColor: "#99999930",
68
- layout: {
69
- candle: {
70
- colors: {
71
- bearish: "#BABABA",
72
- bullish: "#CACACA"
73
- }
74
- },
75
- grid: {
76
- stroke: "#6A6A6A",
77
- yAxis: {
78
- dataLabels: { show: !1 },
79
- scale: {
80
- min: null,
81
- max: null
82
- }
83
- }
84
- },
85
- wick: {
86
- stroke: "#6A6A6A",
87
- extremity: {
88
- color: "#6A6A6A"
89
- }
90
- }
91
- },
92
- tooltip: { show: !1 },
93
- zoom: {
94
- show: !1,
95
- startIndex: null,
96
- endIndex: null
97
- }
98
- }
99
- }
100
- })
101
- }), { userOptionsVisible: ce, setUserOptionsVisibility: Oe, keepUserOptionState: De } = dl({ config: e.value }), { svgRef: ye } = cl({ config: e.value.style.title });
102
- function he() {
103
- const t = st({
104
- userConfig: f.config,
105
- defaultConfig: gt
106
- });
107
- let a = {};
108
- return t.theme ? a = {
109
- ...st({
110
- userConfig: pl.vue_ui_candlestick[t.theme] || f.config,
111
- defaultConfig: t
112
- })
113
- } : a = t, f.config && le(f.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = f.config.style.zoom.startIndex : a.style.zoom.startIndex = null, f.config && le(f.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = f.config.style.zoom.endIndex : a.style.zoom.endIndex = null, f.config && le(f.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = f.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, f.config && le(f.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = f.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
114
- }
115
- te(() => f.config, (t) => {
116
- S.value || (e.value = he()), ce.value = !e.value.userOptions.showOnChartHover, Pe(), J.value += 1, Fe.value += 1, Re.value += 1, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.tooltip.show;
117
- }, { deep: !0 }), te(() => f.dataset, (t) => {
118
- Array.isArray(t) && t.length > 0 && (de.value = !1), v.value.start = 0, v.value.end = t.length, J.value += 1;
119
- }, { deep: !0 });
120
- const c = r({
121
- height: e.value.style.height,
122
- width: e.value.style.width,
123
- xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
124
- yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
125
- }), I = Qe(null), W = Qe(null);
126
- Xt(() => {
127
- Pe();
128
- });
129
- const F = h(() => !!e.value.debug);
130
- function Pe() {
131
- if (lt(f.dataset) && (U({
132
- componentName: "VueUiCandlestick",
133
- type: "dataset",
134
- debug: F.value
135
- }), de.value = !0), lt(f.dataset) || (de.value = e.value.loading), setTimeout(() => {
136
- z.value = !0;
137
- }, 10), e.value.responsive) {
138
- const a = ot(() => {
139
- z.value = !1;
140
- const { width: l, height: o } = ol({
141
- chart: $.value,
142
- title: e.value.style.title.text ? $e.value : null,
143
- slicer: Te.value,
144
- legend: Se.value,
145
- source: Le.value,
146
- noTitle: Ie.value
147
- });
148
- requestAnimationFrame(() => {
149
- c.value.width = l, c.value.height = o - 12, e.value.responsiveProportionalSizing ? (c.value.xAxisFontSize = at({
150
- relator: Math.min(l, o),
151
- adjuster: e.value.style.width,
152
- source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
153
- threshold: 6,
154
- fallback: 6
155
- }), c.value.yAxisFontSize = at({
156
- relator: Math.min(l, o),
157
- adjuster: e.value.style.width,
158
- source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
159
- threshold: 6,
160
- fallback: 6
161
- })) : (c.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, c.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize), se.value && clearTimeout(se.value), se.value = setTimeout(() => {
162
- z.value = !0;
163
- }, 10);
164
- });
165
- });
166
- I.value && (W.value && I.value.unobserve(W.value), I.value.disconnect()), I.value = new ResizeObserver(a), W.value = $.value.parentNode, I.value.observe(W.value);
167
- }
168
- be();
169
- }
170
- Ze(() => {
171
- I.value && (W.value && I.value.unobserve(W.value), I.value.disconnect());
172
- });
173
- const { isPrinting: Ne, isImaging: Be, generatePdf: Ee, generateImage: Ve } = ul({
174
- elementId: `vue-ui-candlestick_${A.value}`,
175
- fileName: e.value.style.title.text || "vue-ui-candlestick",
176
- options: e.value.userOptions.print
177
- }), pt = h(() => e.value.userOptions.show && !e.value.style.title.text), k = r({
178
- showTable: e.value.table.show,
179
- showTooltip: e.value.style.tooltip.show
180
- }), fe = r(0), bt = ot((t) => {
181
- fe.value = t;
182
- }, 100);
183
- yl({ elementRef: H, callback: bt, attr: "height" }), Ze(() => {
184
- fe.value = 0;
185
- });
186
- const Me = h(() => {
187
- let t = 0;
188
- return H.value && (t = fe.value + c.value.xAxisFontSize), t;
189
- });
190
- function mt() {
191
- let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
192
- return re.value && (t = Array.from(re.value.querySelectorAll("text")).reduce((o, b) => {
193
- const g = b.getComputedTextLength();
194
- return g > o ? g : o;
195
- }, 0)), t + 13;
196
- }
197
- const n = h(() => {
198
- const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, b = mt(), g = 12;
199
- return {
200
- top: t + g,
201
- right: c.value.width - a,
202
- left: o + b,
203
- bottom: c.value.height - l - Me.value,
204
- width: c.value.width - o - a - b,
205
- height: c.value.height - t - l - Me.value - g
206
- };
207
- }), X = h(() => C.value.length), v = r({
208
- start: 0,
209
- end: X.value
210
- }), Ue = h(() => C.value.map((t, a) => ({
211
- ...t,
212
- absoluteIndex: a
213
- })).slice(v.value.start, v.value.end)), ge = h(() => (C.value.forEach((t, a) => {
214
- [null, void 0].includes(t[0]) && U({
215
- componentName: "VueUiCandlestick",
216
- type: "datasetAttribute",
217
- property: "period (index 0)",
218
- index: a,
219
- debug: F.value
220
- }), [null, void 0].includes(t[1]) && U({
221
- componentName: "VueUiCandlestick",
222
- type: "datasetAttribute",
223
- property: "open (index 1)",
224
- index: a,
225
- debug: F.value
226
- }), [null, void 0].includes(t[2]) && U({
227
- componentName: "VueUiCandlestick",
228
- type: "datasetAttribute",
229
- property: "high (index 2)",
230
- index: a,
231
- debug: F.value
232
- }), [null, void 0].includes(t[3]) && U({
233
- componentName: "VueUiCandlestick",
234
- type: "datasetAttribute",
235
- property: "low (index 3)",
236
- index: a,
237
- debug: F.value
238
- }), [null, void 0].includes(t[4]) && U({
239
- componentName: "VueUiCandlestick",
240
- type: "datasetAttribute",
241
- property: "last (index 4)",
242
- index: a,
243
- debug: F.value
244
- }), [null, void 0].includes(t[5]) && U({
245
- componentName: "VueUiCandlestick",
246
- type: "datasetAttribute",
247
- property: "volume (index 5)",
248
- index: a,
249
- debug: F.value
250
- });
251
- }), Ue.value.map((t) => ({
252
- absoluteIndex: t.absoluteIndex,
253
- period: t[0],
254
- open: t[1],
255
- high: t[2],
256
- low: t[3],
257
- last: t[4],
258
- volume: t[5]
259
- })))), d = h(() => n.value.width / Ue.value.length), We = h(() => {
260
- const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...ge.value.map((l) => l.high)) : e.value.style.layout.grid.yAxis.scale.max, a = e.value.style.layout.grid.yAxis.scale.min === null ? 0 : e.value.style.layout.grid.yAxis.scale.min;
261
- return {
262
- max: t,
263
- min: a
264
- };
265
- }), _ = h(() => Kt(We.value.min, We.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
266
- function K(t, a) {
267
- return {
268
- ...t,
269
- x: q(n.value.left + a * d.value + d.value / 2),
270
- y: q(n.value.top + (1 - (t - _.value.min) / (_.value.max - _.value.min)) * n.value.height),
271
- value: q(t)
272
- };
273
- }
274
- const w = h(() => ge.value.map((t, a) => {
275
- const l = K(t.open, a), o = K(t.high, a), b = K(t.low, a), g = K(t.last, a), P = t.last > t.open;
276
- return {
277
- period: t.period,
278
- open: l,
279
- high: o,
280
- low: b,
281
- last: g,
282
- volume: t.volume,
283
- isBullish: P,
284
- absoluteIndex: t.absoluteIndex
285
- };
286
- }));
287
- function xt(t) {
288
- return q((t - _.value.min) / (_.value.max - _.value.min));
289
- }
290
- const kt = h(() => _.value.ticks.map((t) => ({
291
- y: n.value.bottom - n.value.height * xt(t),
292
- value: q(t)
293
- }))), wt = h(() => ge.value.map((t) => t.period)), O = h(() => vl({
294
- values: C.value.map((t) => t[0]),
295
- maxDatapoints: C.value.length,
296
- formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
297
- start: v.value.start,
298
- end: v.value.end
299
- })), He = h(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
300
- start: O.value.find((t) => t.absoluteIndex === v.value.start).text,
301
- end: O.value.find((t) => t.absoluteIndex === v.value.end - 1).text
302
- } : {
303
- start: C.value[v.value.start] ? C.value[v.value.start][0] : C.value[0][0],
304
- end: C.value[v.value.end - 1] ? C.value[v.value.end - 1][0] : C.value.at(-1)[0]
305
- }), pe = r(null);
306
- function At(t, a) {
307
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: t + v.value.start });
308
- }
309
- function Ct(t, a) {
310
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: t + v.value.start }), ne.value = void 0, ue.value = !1;
311
- }
312
- function _t(t, a) {
313
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + v.value.start }), ne.value = t, pe.value = {
314
- datapoint: a,
315
- seriesIndex: t,
316
- series: w.value,
317
- config: e.value
318
- };
319
- const l = e.value.style.tooltip.customFormat;
320
- if (ll(l) && al(() => l({
321
- seriesIndex: t,
322
- datapoint: a,
323
- series: w.value,
324
- config: e.value
325
- })))
326
- ie.value = l({
327
- seriesIndex: t,
328
- datapoint: a,
329
- series: w.value,
330
- config: e.value
331
- });
332
- else if (e.value.style.tooltip.show) {
333
- let o = "";
334
- const { period: b, open: g, high: P, low: ke, last: we, volume: ee, isBullish: Ke } = w.value[t], { period: Ql, open: Dt, high: Pt, low: Nt, last: Bt, volume: Et } = e.value.translations, Vt = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? O.value[t].text : b;
335
- o += `<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" stroke="${e.value.style.layout.candle.stroke}" stroke-width="${e.value.style.layout.candle.strokeWidth}"
336
- fill="${e.value.style.layout.candle.gradient.show ? Ke ? `url(#bullish_gradient_${A.value})` : `url(#bearish_gradient_${A.value})` : Ke ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${Vt}</div>`, o += `${Et} : <b>${isNaN(ee) ? "-" : Number(ee.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, o += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`;
337
- const Mt = L({
338
- p: e.value.style.tooltip.prefix,
339
- v: g.value,
340
- s: e.value.style.tooltip.suffix,
341
- r: e.value.style.tooltip.roundingValue
342
- });
343
- o += `<div>${Dt}: <b>${Mt}</b></div>`;
344
- const Ut = L({
345
- p: e.value.style.tooltip.prefix,
346
- v: P.value,
347
- s: e.value.style.tooltip.suffix,
348
- r: e.value.style.tooltip.roundingValue
349
- });
350
- o += `<div>${Pt}: <b>${Ut}</b></div>`;
351
- const Wt = L({
352
- p: e.value.style.tooltip.prefix,
353
- v: ke.value,
354
- s: e.value.style.tooltip.suffix,
355
- r: e.value.style.tooltip.roundingValue
356
- });
357
- o += `<div>${Nt}: <b>${Wt}</b></div>`;
358
- const Ht = L({
359
- p: e.value.style.tooltip.prefix,
360
- v: we.value,
361
- s: e.value.style.tooltip.suffix,
362
- r: e.value.style.tooltip.roundingValue
363
- });
364
- o += `<div>${Bt}: <b>${Ht}</b></div>`, o += "</div>", ie.value = `<div style="text-align:right">${o}</div>`;
365
- }
366
- ue.value = !0;
367
- }
368
- function zt() {
369
- be();
370
- }
371
- const Ge = r(null);
372
- async function be() {
373
- await Ae(), await Ae();
374
- const { startIndex: t, endIndex: a } = e.value.style.zoom, l = Ge.value, o = X.value;
375
- v.value = { start: 0, end: o }, (t != null || a != null) && l ? (t != null ? l.setStartValue(t) : (v.value.start = 0, l.setStartValue(0)), a != null ? l.setEndValue($t(a + 1)) : (v.value.end = o, l.setEndValue(o))) : (v.value = { start: 0, end: o }, J.value += 1);
376
- }
377
- function $t(t) {
378
- const a = X.value;
379
- return t > a ? a : t < 0 || e.value.style.zoom.startIndex !== null && t < e.value.style.zoom.startIndex ? e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex + 1 : 1 : t;
380
- }
381
- function me(t = null) {
382
- Ae(() => {
383
- const a = [e.value.translations.period, e.value.translations.open, e.value.translations.high, e.value.translations.low, e.value.translations.last, e.value.translations.volume], l = w.value.map((g, P) => [
384
- e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? O.value[P].text : g.period,
385
- g.open.value,
386
- g.high.value,
387
- g.low.value,
388
- g.last.value,
389
- g.volume
390
- ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), b = el(o);
391
- t ? t(b) : tl({ csvContent: b, title: e.value.style.title.text || "vue-ui-candlestick" });
392
- });
393
- }
394
- const Q = h(() => {
395
- const t = w.value.map((o, b) => {
396
- const g = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? O.value[b].text : o.period, P = L({
397
- p: e.value.table.td.prefix,
398
- v: o.open.value,
399
- s: e.value.table.td.suffix,
400
- r: e.value.table.td.roundingValue
401
- }), ke = L({
402
- p: e.value.table.td.prefix,
403
- v: o.high.value,
404
- s: e.value.table.td.suffix,
405
- r: e.value.table.td.roundingValue
406
- }), we = L({
407
- p: e.value.table.td.prefix,
408
- v: o.low.value,
409
- s: e.value.table.td.suffix,
410
- r: e.value.table.td.roundingValue
411
- }), ee = L({
412
- p: e.value.table.td.prefix,
413
- v: o.last.value,
414
- s: e.value.table.td.suffix,
415
- r: e.value.table.td.roundingValue
416
- });
417
- return [
418
- `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" fill="${e.value.style.layout.candle.gradient.show ? o.isBullish ? `url(#bullish_gradient_${A.value}` : `url(#bearish_gradient_${A.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${g}`,
419
- P,
420
- ke,
421
- we,
422
- ee,
423
- `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
424
- ];
425
- }), a = {
426
- th: {
427
- backgroundColor: e.value.table.th.backgroundColor,
428
- color: e.value.table.th.color,
429
- outline: e.value.table.th.outline
430
- },
431
- td: {
432
- backgroundColor: e.value.table.td.backgroundColor,
433
- color: e.value.table.td.color,
434
- outline: e.value.table.td.outline
435
- },
436
- breakpoint: e.value.table.responsiveBreakpoint
437
- }, l = [
438
- e.value.translations.period,
439
- e.value.translations.open,
440
- e.value.translations.high,
441
- e.value.translations.low,
442
- e.value.translations.last,
443
- e.value.translations.volume
444
- ];
445
- return { head: l, body: t, config: a, colNames: l };
446
- }), D = r(!1);
447
- function Xe(t) {
448
- D.value = t, ze.value += 1;
449
- }
450
- function je() {
451
- k.value.showTable = !k.value.showTable;
452
- }
453
- function Ye() {
454
- k.value.showTooltip = !k.value.showTooltip;
455
- }
456
- const Z = r(!1);
457
- function xe() {
458
- Z.value = !Z.value;
459
- }
460
- async function St({ scale: t = 2 } = {}) {
461
- if (!$.value) return;
462
- const { width: a, height: l } = $.value.getBoundingClientRect(), o = a / l, { imageUri: b, base64: g } = await fl({ domElement: $.value, base64: !0, img: !0, scale: t });
463
- return {
464
- imageUri: b,
465
- base64: g,
466
- title: e.value.style.title.text,
467
- width: a,
468
- height: l,
469
- aspectRatio: o
470
- };
471
- }
472
- const Tt = h(() => c.value.width), Lt = h(() => c.value.height);
473
- hl({
474
- timeLabelsEls: H,
475
- timeLabels: O,
476
- slicer: v,
477
- configRef: e,
478
- rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
479
- autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate", "enable"],
480
- isAutoSize: !1,
481
- rotation: e.value.style.layout.grid.xAxis.dataLabels.autoRotate.angle,
482
- width: Tt,
483
- height: Lt
484
- }), te(e, () => {
485
- k.value = {
486
- showTable: e.value.table.show,
487
- showTooltip: e.value.style.tooltip.show
488
- };
489
- }, { immediate: !0 });
490
- const j = h(() => {
491
- const t = e.value.table.useDialog && !e.value.table.show, a = k.value.showTable;
492
- return {
493
- component: t ? ft : vt,
494
- title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? `: ${e.value.style.title.subtitle.text}` : ""}`,
495
- props: t ? {
496
- backgroundColor: e.value.table.th.backgroundColor,
497
- color: e.value.table.th.color,
498
- headerColor: e.value.table.th.color,
499
- headerBg: e.value.table.th.backgroundColor,
500
- isFullscreen: D.value,
501
- fullscreenParent: $.value,
502
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
503
- } : {
504
- hideDetails: !0,
505
- config: {
506
- open: a,
507
- maxHeight: 1e4,
508
- body: {
509
- backgroundColor: e.value.style.backgroundColor,
510
- color: e.value.style.color
511
- },
512
- head: {
513
- backgroundColor: e.value.style.backgroundColor,
514
- color: e.value.style.color
515
- }
516
- }
517
- }
518
- };
519
- });
520
- te(() => k.value.showTable, (t) => {
521
- e.value.table.show || (t && e.value.table.useDialog && G.value ? G.value.open() : "close" in G.value && G.value.close());
522
- });
523
- function qe() {
524
- k.value.showTable = !1, ve.value && ve.value.setTableIconState(!1);
525
- }
526
- const It = h(() => e.value.style.backgroundColor), Rt = h(() => e.value.style.title), { exportSvg: Ft, getSvg: Ot } = rl({
527
- svg: ye,
528
- title: Rt,
529
- backgroundColor: It
530
- });
531
- async function Je({ isCb: t }) {
532
- if (t) {
533
- const { blob: a, url: l, text: o, dataUrl: b } = await Ot();
534
- e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: b });
535
- } else
536
- Ft();
537
- }
538
- return it({
539
- getImage: St,
540
- generatePdf: Ee,
541
- generateCsv: me,
542
- generateImage: Ve,
543
- generateSvg: Je,
544
- toggleTable: je,
545
- toggleTooltip: Ye,
546
- toggleAnnotator: xe,
547
- toggleFullscreen: Xe
548
- }), (t, a) => (s(), i("div", {
549
- ref_key: "candlestickChart",
550
- ref: $,
551
- class: T(`vue-data-ui-component vue-ui-candlestick ${D.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
552
- style: Ce(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
553
- id: `vue-ui-candlestick_${A.value}`,
554
- onMouseenter: a[3] || (a[3] = () => u(Oe)(!0)),
555
- onMouseleave: a[4] || (a[4] = () => u(Oe)(!1))
556
- }, [
557
- e.value.userOptions.buttons.annotator ? (s(), N(u(ct), {
558
- key: 0,
559
- svgRef: u(ye),
560
- backgroundColor: e.value.style.backgroundColor,
561
- color: e.value.style.color,
562
- active: Z.value,
563
- onClose: xe
564
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
565
- pt.value ? (s(), i("div", {
566
- key: 1,
567
- ref_key: "noTitle",
568
- ref: Ie,
569
- class: "vue-data-ui-no-title-space",
570
- style: "height:36px; width: 100%;background:transparent"
571
- }, null, 512)) : p("", !0),
572
- e.value.style.title.text ? (s(), i("div", {
573
- key: 2,
574
- ref_key: "chartTitle",
575
- ref: $e,
576
- style: "width:100%;background:transparent"
577
- }, [
578
- (s(), N(gl, {
579
- key: `title_${Fe.value}`,
580
- config: {
581
- title: {
582
- cy: "candlestick-div-title",
583
- ...e.value.style.title
584
- },
585
- subtitle: {
586
- cy: "candlestick-div-subtitle",
587
- ...e.value.style.title.subtitle
588
- }
589
- }
590
- }, null, 8, ["config"]))
591
- ], 512)) : p("", !0),
592
- e.value.userOptions.show && oe.value && (u(De) || u(ce)) ? (s(), N(u(yt), {
593
- ref_key: "userOptionsRef",
594
- ref: ve,
595
- key: `user_options_${ze.value}`,
596
- backgroundColor: e.value.style.backgroundColor,
597
- color: e.value.style.color,
598
- isImaging: u(Be),
599
- isPrinting: u(Ne),
600
- uid: A.value,
601
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
602
- hasPdf: e.value.userOptions.buttons.pdf,
603
- hasImg: e.value.userOptions.buttons.img,
604
- hasSvg: e.value.userOptions.buttons.svg,
605
- hasXls: e.value.userOptions.buttons.csv,
606
- hasTable: e.value.userOptions.buttons.table,
607
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
608
- isFullscreen: D.value,
609
- isTooltip: k.value.showTooltip,
610
- titles: { ...e.value.userOptions.buttonTitles },
611
- chartElement: $.value,
612
- position: e.value.userOptions.position,
613
- hasAnnotator: e.value.userOptions.buttons.annotator,
614
- isAnnotation: Z.value,
615
- callbacks: e.value.userOptions.callbacks,
616
- printScale: e.value.userOptions.print.scale,
617
- tableDialog: e.value.table.useDialog,
618
- onToggleFullscreen: Xe,
619
- onGeneratePdf: u(Ee),
620
- onGenerateCsv: me,
621
- onGenerateImage: u(Ve),
622
- onGenerateSvg: Je,
623
- onToggleTable: je,
624
- onToggleTooltip: Ye,
625
- onToggleAnnotator: xe,
626
- style: Ce({
627
- visibility: u(De) ? u(ce) ? "visible" : "hidden" : "visible"
628
- })
629
- }, et({ _: 2 }, [
630
- t.$slots.menuIcon ? {
631
- name: "menuIcon",
632
- fn: m(({ isOpen: l, color: o }) => [
633
- x(t.$slots, "menuIcon", B(E({ isOpen: l, color: o })), void 0, !0)
634
- ]),
635
- key: "0"
636
- } : void 0,
637
- t.$slots.optionTooltip ? {
638
- name: "optionTooltip",
639
- fn: m(() => [
640
- x(t.$slots, "optionTooltip", {}, void 0, !0)
641
- ]),
642
- key: "1"
643
- } : void 0,
644
- t.$slots.optionPdf ? {
645
- name: "optionPdf",
646
- fn: m(() => [
647
- x(t.$slots, "optionPdf", {}, void 0, !0)
648
- ]),
649
- key: "2"
650
- } : void 0,
651
- t.$slots.optionCsv ? {
652
- name: "optionCsv",
653
- fn: m(() => [
654
- x(t.$slots, "optionCsv", {}, void 0, !0)
655
- ]),
656
- key: "3"
657
- } : void 0,
658
- t.$slots.optionImg ? {
659
- name: "optionImg",
660
- fn: m(() => [
661
- x(t.$slots, "optionImg", {}, void 0, !0)
662
- ]),
663
- key: "4"
664
- } : void 0,
665
- t.$slots.optionTable ? {
666
- name: "optionTable",
667
- fn: m(() => [
668
- x(t.$slots, "optionTable", {}, void 0, !0)
669
- ]),
670
- key: "5"
671
- } : void 0,
672
- t.$slots.optionFullscreen ? {
673
- name: "optionFullscreen",
674
- fn: m(({ toggleFullscreen: l, isFullscreen: o }) => [
675
- x(t.$slots, "optionFullscreen", B(E({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
676
- ]),
677
- key: "6"
678
- } : void 0,
679
- t.$slots.optionAnnotator ? {
680
- name: "optionAnnotator",
681
- fn: m(({ toggleAnnotator: l, isAnnotator: o }) => [
682
- x(t.$slots, "optionAnnotator", B(E({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
683
- ]),
684
- key: "7"
685
- } : void 0
686
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : p("", !0),
687
- (s(), i("svg", {
688
- ref_key: "svgRef",
689
- ref: ye,
690
- xmlns: u(Qt),
691
- "aria-label": e.value.style.title.text || "candlestick chart",
692
- class: T({ "vue-data-ui-fullscreen--on": D.value, "vue-data-ui-fulscreen--off": !D.value }),
693
- viewBox: `0 0 ${c.value.width <= 0 ? 10 : c.value.width} ${c.value.height <= 0 ? 10 : c.value.height}`,
694
- style: Ce(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
695
- }, [
696
- _e(u(ht)),
697
- t.$slots["chart-background"] ? (s(), i("foreignObject", {
698
- key: 0,
699
- x: n.value.left,
700
- y: n.value.top,
701
- width: Math.max(0.1, n.value.width),
702
- height: Math.max(0.1, n.value.height),
703
- style: {
704
- pointerEvents: "none"
705
- }
706
- }, [
707
- x(t.$slots, "chart-background", {}, void 0, !0)
708
- ], 8, wl)) : p("", !0),
709
- w.value.length > 0 ? (s(), i("g", Al, [
710
- y("defs", null, [
711
- y("linearGradient", {
712
- id: `bearish_gradient_${A.value}`,
713
- x2: "0%",
714
- y2: "100%"
715
- }, [
716
- y("stop", {
717
- offset: "0%",
718
- "stop-color": e.value.style.layout.candle.colors.bearish
719
- }, null, 8, _l),
720
- y("stop", {
721
- offset: "50%",
722
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
723
- }, null, 8, zl),
724
- y("stop", {
725
- offset: "100%",
726
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
727
- }, null, 8, $l)
728
- ], 8, Cl),
729
- y("linearGradient", {
730
- id: `bullish_gradient_${A.value}`,
731
- x2: "0%",
732
- y2: "100%"
733
- }, [
734
- y("stop", {
735
- offset: "0%",
736
- "stop-color": e.value.style.layout.candle.colors.bullish
737
- }, null, 8, Tl),
738
- y("stop", {
739
- offset: "50%",
740
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
741
- }, null, 8, Ll),
742
- y("stop", {
743
- offset: "100%",
744
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
745
- }, null, 8, Il)
746
- ], 8, Sl)
747
- ]),
748
- e.value.style.layout.grid.show ? (s(), i("g", Rl, [
749
- y("line", {
750
- x1: n.value.left,
751
- x2: n.value.left,
752
- y1: n.value.top,
753
- y2: n.value.bottom,
754
- stroke: e.value.style.layout.grid.stroke,
755
- "stroke-width": e.value.style.layout.grid.strokeWidth,
756
- "stroke-linecap": "round"
757
- }, null, 8, Fl),
758
- y("line", {
759
- x1: n.value.left,
760
- x2: n.value.right,
761
- y1: n.value.bottom,
762
- y2: n.value.bottom,
763
- stroke: e.value.style.layout.grid.stroke,
764
- "stroke-width": e.value.style.layout.grid.strokeWidth,
765
- "stroke-linecap": "round"
766
- }, null, 8, Ol)
767
- ])) : p("", !0),
768
- e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), i("g", {
769
- key: 1,
770
- ref_key: "scaleLabels",
771
- ref: re
772
- }, [
773
- (s(!0), i(V, null, M(kt.value, (l, o) => (s(), i("g", null, [
774
- l.value >= _.value.min && l.value <= _.value.max ? (s(), i("line", {
775
- key: 0,
776
- x1: n.value.left,
777
- x2: n.value.left - 5,
778
- y1: l.y,
779
- y2: l.y,
780
- stroke: e.value.style.layout.grid.stroke,
781
- "stroke-width": e.value.style.layout.grid.strokeWidth,
782
- "stroke-linecap": "round"
783
- }, null, 8, Dl)) : p("", !0),
784
- l.value >= _.value.min && l.value <= _.value.max ? (s(), i("text", {
785
- key: 1,
786
- x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
787
- y: l.y + c.value.yAxisFontSize / 3,
788
- "font-size": c.value.yAxisFontSize,
789
- "text-anchor": "end",
790
- fill: e.value.style.layout.grid.yAxis.dataLabels.color,
791
- "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
792
- }, Y(u(L)({
793
- p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
794
- v: l.value,
795
- s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
796
- r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
797
- })), 9, Pl)) : p("", !0)
798
- ]))), 256))
799
- ], 512)) : p("", !0),
800
- e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
801
- key: 2,
802
- ref_key: "timeLabelsEls",
803
- ref: H
804
- }, [
805
- (s(!0), i(V, null, M(wt.value, (l, o) => (s(), i("g", null, [
806
- y("text", {
807
- class: "vue-data-ui-time-label",
808
- transform: `translate(${n.value.left + d.value * o + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
809
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
810
- "font-size": c.value.xAxisFontSize,
811
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
812
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
813
- }, Y(l), 9, Nl)
814
- ]))), 256))
815
- ], 512)) : p("", !0),
816
- e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
817
- key: 3,
818
- ref_key: "timeLabelsEls",
819
- ref: H
820
- }, [
821
- (s(!0), i(V, null, M(O.value, (l, o) => (s(), i("g", null, [
822
- y("text", {
823
- class: "vue-data-ui-time-label",
824
- transform: `translate(${n.value.left + d.value * o + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
825
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
826
- "font-size": c.value.xAxisFontSize,
827
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
828
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
829
- }, Y(l.text), 9, Bl)
830
- ]))), 256))
831
- ], 512)) : p("", !0),
832
- y("g", null, [
833
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("g", null, [
834
- y("rect", {
835
- x: l.open.x - e.value.style.layout.wick.strokeWidth / 2,
836
- y: l.high.y,
837
- width: e.value.style.layout.wick.strokeWidth,
838
- height: Math.abs(l.high.y - l.low.y),
839
- fill: e.value.style.layout.wick.stroke,
840
- stroke: "none",
841
- rx: e.value.style.layout.wick.strokeWidth / 2,
842
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
843
- }, null, 10, El),
844
- e.value.style.layout.wick.extremity.shape === "circle" ? (s(), i("g", Vl, [
845
- y("circle", {
846
- cx: l.high.x,
847
- cy: l.high.y,
848
- r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
849
- fill: e.value.style.layout.wick.extremity.color,
850
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
851
- }, null, 10, Ml),
852
- y("circle", {
853
- cx: l.low.x,
854
- cy: l.low.y,
855
- r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
856
- fill: e.value.style.layout.wick.extremity.color,
857
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
858
- }, null, 10, Ul)
859
- ])) : p("", !0),
860
- e.value.style.layout.wick.extremity.shape === "line" ? (s(), i("g", Wl, [
861
- y("rect", {
862
- x: l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
863
- y: l.high.y - e.value.style.layout.wick.strokeWidth / 2,
864
- width: Math.abs(l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2 - (l.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
865
- height: e.value.style.layout.wick.strokeWidth,
866
- rx: e.value.style.layout.wick.strokeWidth / 2,
867
- fill: e.value.style.layout.wick.extremity.color,
868
- stroke: "none",
869
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
870
- }, null, 10, Hl),
871
- y("rect", {
872
- x: l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
873
- y: l.low.y - e.value.style.layout.wick.strokeWidth / 2,
874
- width: Math.abs(l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2 - (l.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
875
- height: e.value.style.layout.wick.strokeWidth,
876
- fill: e.value.style.layout.wick.extremity.color,
877
- stroke: "none",
878
- rx: e.value.style.layout.wick.strokeWidth / 2,
879
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
880
- }, null, 10, Gl)
881
- ])) : p("", !0)
882
- ]))), 256))
883
- ]),
884
- y("g", null, [
885
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
886
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
887
- y: l.isBullish ? l.last.y : l.open.y,
888
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
889
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
890
- fill: e.value.style.layout.candle.gradient.underlayer,
891
- rx: e.value.style.layout.candle.borderRadius,
892
- stroke: "none",
893
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
894
- }, null, 10, Xl))), 256)),
895
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
896
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
897
- y: l.isBullish ? l.last.y : l.open.y,
898
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
899
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
900
- fill: l.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${A.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${A.value})` : e.value.style.layout.candle.colors.bearish,
901
- rx: e.value.style.layout.candle.borderRadius,
902
- stroke: e.value.style.layout.candle.stroke,
903
- "stroke-width": e.value.style.layout.candle.strokeWidth,
904
- "stroke-linecap": "round",
905
- "stroke-linejoin": "round",
906
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
907
- }, null, 10, jl))), 256))
908
- ]),
909
- y("g", null, [
910
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
911
- x: n.value.left + o * d.value,
912
- y: n.value.top,
913
- height: n.value.height <= 0 ? 1e-4 : n.value.height,
914
- width: d.value <= 0 ? 1e-4 : d.value,
915
- fill: ne.value === o ? u(Zt)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
916
- onMouseover: () => _t(o, l),
917
- onMouseleave: () => Ct(o, l),
918
- onClick: () => At(o, l)
919
- }, null, 40, Yl))), 256))
920
- ])
921
- ])) : p("", !0),
922
- x(t.$slots, "svg", { svg: c.value }, void 0, !0)
923
- ], 14, kl)),
924
- t.$slots.watermark ? (s(), i("div", ql, [
925
- x(t.$slots, "watermark", B(E({ isPrinting: u(Ne) || u(Be) })), void 0, !0)
926
- ])) : p("", !0),
927
- e.value.style.zoom.show && oe.value ? (s(), i("div", {
928
- key: 5,
929
- ref_key: "chartSlicer",
930
- ref: Te
931
- }, [
932
- (s(), N(bl, {
933
- ref_key: "slicerComponent",
934
- ref: Ge,
935
- key: `slicer_${J.value}`,
936
- background: e.value.style.zoom.color,
937
- borderColor: e.value.style.backgroundColor,
938
- fontSize: e.value.style.zoom.fontSize,
939
- useResetSlot: e.value.style.zoom.useResetSlot,
940
- labelLeft: He.value.start,
941
- labelRight: He.value.end,
942
- textColor: e.value.style.color,
943
- inputColor: e.value.style.zoom.color,
944
- selectColor: e.value.style.zoom.highlightColor,
945
- max: X.value,
946
- min: 0,
947
- valueStart: v.value.start,
948
- valueEnd: v.value.end,
949
- start: v.value.start,
950
- "onUpdate:start": a[0] || (a[0] = (l) => v.value.start = l),
951
- end: v.value.end,
952
- "onUpdate:end": a[1] || (a[1] = (l) => v.value.end = l),
953
- refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
954
- refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : X.value,
955
- enableRangeHandles: e.value.style.zoom.enableRangeHandles,
956
- enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
957
- focusOnDrag: e.value.style.zoom.focusOnDrag,
958
- focusRangeRatio: e.value.style.zoom.focusRangeRatio,
959
- onReset: zt
960
- }, {
961
- "reset-action": m(({ reset: l }) => [
962
- x(t.$slots, "reset-action", B(E({ reset: l })), void 0, !0)
963
- ]),
964
- _: 3
965
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "focusOnDrag", "focusRangeRatio"]))
966
- ], 512)) : p("", !0),
967
- y("div", {
968
- ref_key: "chartLegend",
969
- ref: Se
970
- }, [
971
- x(t.$slots, "legend", { legend: w.value }, void 0, !0)
972
- ], 512),
973
- t.$slots.source ? (s(), i("div", {
974
- key: 6,
975
- ref_key: "source",
976
- ref: Le,
977
- dir: "auto"
978
- }, [
979
- x(t.$slots, "source", {}, void 0, !0)
980
- ], 512)) : p("", !0),
981
- _e(u(rt), {
982
- show: k.value.showTooltip && ue.value,
983
- backgroundColor: e.value.style.tooltip.backgroundColor,
984
- color: e.value.style.tooltip.color,
985
- borderRadius: e.value.style.tooltip.borderRadius,
986
- borderColor: e.value.style.tooltip.borderColor,
987
- borderWidth: e.value.style.tooltip.borderWidth,
988
- fontSize: e.value.style.tooltip.fontSize,
989
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
990
- position: e.value.style.tooltip.position,
991
- offsetY: e.value.style.tooltip.offsetY,
992
- parent: $.value,
993
- content: ie.value,
994
- isFullscreen: D.value,
995
- isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
996
- smooth: e.value.style.tooltip.smooth,
997
- backdropFilter: e.value.style.tooltip.backdropFilter,
998
- smoothForce: e.value.style.tooltip.smoothForce,
999
- smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
1000
- }, {
1001
- "tooltip-before": m(() => [
1002
- x(t.$slots, "tooltip-before", B(E({ ...pe.value })), void 0, !0)
1003
- ]),
1004
- "tooltip-after": m(() => [
1005
- x(t.$slots, "tooltip-after", B(E({ ...pe.value })), void 0, !0)
1006
- ]),
1007
- _: 3
1008
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1009
- oe.value && e.value.userOptions.buttons.table ? (s(), N(jt(j.value.component), Yt({ key: 7 }, j.value.props, {
1010
- ref_key: "tableUnit",
1011
- ref: G,
1012
- onClose: qe
1013
- }), et({
1014
- content: m(() => [
1015
- (s(), N(u(dt), {
1016
- key: `table_${Re.value}`,
1017
- colNames: Q.value.colNames,
1018
- head: Q.value.head,
1019
- body: Q.value.body,
1020
- config: Q.value.config,
1021
- title: e.value.table.useDialog ? "" : j.value.title,
1022
- withCloseButton: !e.value.table.useDialog,
1023
- onClose: qe
1024
- }, {
1025
- th: m(({ th: l }) => [
1026
- tt(Y(l), 1)
1027
- ]),
1028
- td: m(({ td: l }) => [
1029
- y("div", { innerHTML: l }, null, 8, Jl)
1030
- ]),
1031
- _: 1
1032
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1033
- ]),
1034
- _: 2
1035
- }, [
1036
- e.value.table.useDialog ? {
1037
- name: "title",
1038
- fn: m(() => [
1039
- tt(Y(j.value.title), 1)
1040
- ]),
1041
- key: "0"
1042
- } : void 0,
1043
- e.value.table.useDialog ? {
1044
- name: "actions",
1045
- fn: m(() => [
1046
- y("button", {
1047
- tabindex: "0",
1048
- class: "vue-ui-user-options-button",
1049
- onClick: a[2] || (a[2] = (l) => me(e.value.userOptions.callbacks.csv))
1050
- }, [
1051
- _e(u(nt), {
1052
- name: "excel",
1053
- stroke: j.value.props.color
1054
- }, null, 8, ["stroke"])
1055
- ])
1056
- ]),
1057
- key: "1"
1058
- } : void 0
1059
- ]), 1040)) : p("", !0),
1060
- u(S) ? (s(), N(nl, { key: 8 })) : p("", !0)
1061
- ], 46, xl));
1062
- }
1063
- }, fa = /* @__PURE__ */ ml(Kl, [["__scopeId", "data-v-4adeecda"]]);
1064
- export {
1065
- fa as default
1066
- };