vue-data-ui 3.3.3 → 3.4.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 (160) hide show
  1. package/dist/{Arrow-ayTeSvpe.js → Arrow-CRe_nKB4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Cysanw8-.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
  3. package/dist/{BaseIcon-DG6cvf2h.js → BaseIcon-B5KaGWWC.js} +1 -1
  4. package/dist/{ColorPicker-CA8kKZjZ.js → ColorPicker-BMztHpBp.js} +10 -10
  5. package/dist/{DataTable-DUpZ_s2c.js → DataTable-DOx3zgih.js} +2 -2
  6. package/dist/{Legend-CCBZ2x8T.js → Legend-C8u37J42.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-D2IMGwaN.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
  8. package/dist/{PackageVersion-CQvYRebC.js → PackageVersion-VpPtLYhK.js} +1 -1
  9. package/dist/{PenAndPaper-D9LruJaM.js → PenAndPaper-Dj2diYr0.js} +3 -3
  10. package/dist/{Shape-BS9UGhNq.js → Shape-BhNvlGIN.js} +1 -1
  11. package/dist/{Slicer-BOki89CB.js → Slicer-BHgEsIBU.js} +111 -111
  12. package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
  13. package/dist/{SparkTooltip-svd8Hb6c.js → SparkTooltip-CL3cNRQ_.js} +1 -1
  14. package/dist/{Title-B6rAo9Oz.js → Title-CFmv95In.js} +1 -1
  15. package/dist/{Tooltip-DaInVNiV.js → Tooltip-Cs4v8OnI.js} +1 -1
  16. package/dist/{UserOptions-CJXSEhan.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-Tq92GZKA.js → dom-to-png-xQ7LXrxp.js} +1 -1
  83. package/dist/{img-DI-W68vp.js → img-CFY3JivG.js} +1 -1
  84. package/dist/{lib-CSDxt1Zh.js → lib-BcBZIm6u.js} +439 -395
  85. package/dist/{pdf-BzVpWnNO.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-CtQ7pJ8G.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
  89. package/dist/{useNestedProp-Dh-ldrr5.js → useNestedProp-B7CiTRDS.js} +327 -240
  90. package/dist/{usePrinter-Cq8Pt6Lh.js → usePrinter-C1GiglOH.js} +2 -2
  91. package/dist/{vue-data-ui-CDY7snWF.js → vue-data-ui-oDJui39L.js} +64 -64
  92. package/dist/vue-data-ui.js +100 -100
  93. package/dist/{vue-ui-3d-bar-DbpiTjGu.js → vue-ui-3d-bar-wycTM073.js} +56 -56
  94. package/dist/{vue-ui-accordion-CaClZrCp.js → vue-ui-accordion-BKkTS12x.js} +3 -3
  95. package/dist/{vue-ui-age-pyramid-DuIxXz5p.js → vue-ui-age-pyramid-C5NUZ_Y7.js} +39 -39
  96. package/dist/{vue-ui-annotator-C2efSKQK.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
  97. package/dist/{vue-ui-bullet-qpcqLKmp.js → vue-ui-bullet-CIsX5UJw.js} +7 -7
  98. package/dist/vue-ui-candlestick-BRFx3_KK.js +1334 -0
  99. package/dist/{vue-ui-carousel-table-CCTtArFX.js → vue-ui-carousel-table-hJySHJTu.js} +29 -29
  100. package/dist/{vue-ui-chestnut-CbvxJ8hy.js → vue-ui-chestnut-D4GjvQh0.js} +70 -70
  101. package/dist/{vue-ui-chord-Cp9nyIdv.js → vue-ui-chord-By2NOs0N.js} +35 -35
  102. package/dist/{vue-ui-circle-pack-kHzd0UYO.js → vue-ui-circle-pack-OCmAkTNs.js} +59 -59
  103. package/dist/{vue-ui-cursor-DEvkJRCz.js → vue-ui-cursor-iuati4v1.js} +2 -2
  104. package/dist/{vue-ui-dashboard-k_mz9iwy.js → vue-ui-dashboard-C7fwU9xb.js} +67 -67
  105. package/dist/{vue-ui-digits-CqWCkEu2.js → vue-ui-digits-eYxf3UFN.js} +2 -2
  106. package/dist/{vue-ui-donut-CDKS6sVu.js → vue-ui-donut-dVVBUQJz.js} +189 -189
  107. package/dist/{vue-ui-donut-evolution-C6cGI_P3.js → vue-ui-donut-evolution-BoWGaQP0.js} +82 -82
  108. package/dist/{vue-ui-dumbbell-ZjJst3xs.js → vue-ui-dumbbell-YMPZ3CVA.js} +66 -66
  109. package/dist/{vue-ui-flow-sX1PYIkr.js → vue-ui-flow-BE62rVS3.js} +75 -75
  110. package/dist/{vue-ui-funnel--VViM9gH.js → vue-ui-funnel-kNpDFAWo.js} +63 -63
  111. package/dist/{vue-ui-galaxy-Du0V9GF8.js → vue-ui-galaxy-BBBiXXyk.js} +62 -62
  112. package/dist/{vue-ui-gauge-BAe4p2g-.js → vue-ui-gauge-PQNTTl3Y.js} +58 -58
  113. package/dist/{vue-ui-gizmo-CfjwAt38.js → vue-ui-gizmo-D3gQxQz3.js} +3 -3
  114. package/dist/{vue-ui-heatmap-Q0jrPM5h.js → vue-ui-heatmap-CKWQButF.js} +104 -104
  115. package/dist/{vue-ui-history-plot-CLSN3mPy.js → vue-ui-history-plot-DYFzdR4Z.js} +91 -91
  116. package/dist/{vue-ui-kpi-CBRgXD1s.js → vue-ui-kpi-N8s0i48S.js} +3 -3
  117. package/dist/{vue-ui-mini-loader-3yCeDEPK.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
  118. package/dist/{vue-ui-molecule-Ddh4hbX0.js → vue-ui-molecule-Cklyb74B.js} +102 -102
  119. package/dist/{vue-ui-mood-radar-CK8UF-ka.js → vue-ui-mood-radar-Cvq4ZuLe.js} +28 -28
  120. package/dist/{vue-ui-nested-donuts-DO0FV0tU.js → vue-ui-nested-donuts-Bm78P1ES.js} +60 -60
  121. package/dist/{vue-ui-onion-DXLqoj-4.js → vue-ui-onion-Bh5jTb31.js} +46 -46
  122. package/dist/{vue-ui-parallel-coordinate-plot-BlffHAHB.js → vue-ui-parallel-coordinate-plot-BKdN2OsW.js} +64 -64
  123. package/dist/{vue-ui-quadrant-pw2ALj7p.js → vue-ui-quadrant-BPhJzots.js} +8 -8
  124. package/dist/{vue-ui-quick-chart-9oGbV593.js → vue-ui-quick-chart-DbJR9CN3.js} +86 -86
  125. package/dist/vue-ui-radar-CrenQprr.js +938 -0
  126. package/dist/{vue-ui-rating-C4yZY1sb.js → vue-ui-rating-fR2WRHYO.js} +2 -2
  127. package/dist/{vue-ui-relation-circle-Duxv-A4H.js → vue-ui-relation-circle-BJ5RuZ0j.js} +31 -31
  128. package/dist/{vue-ui-ridgeline-B-q7J-C0.js → vue-ui-ridgeline-CKuom5Bu.js} +97 -97
  129. package/dist/{vue-ui-rings-PRAcmP1H.js → vue-ui-rings-B84GAEf4.js} +50 -50
  130. package/dist/{vue-ui-scatter-BLW4MJtJ.js → vue-ui-scatter-CBX-g9w3.js} +100 -100
  131. package/dist/{vue-ui-skeleton-D0PF0jxa.js → vue-ui-skeleton-CZ8xxpEU.js} +3 -3
  132. package/dist/{vue-ui-smiley-Be44gMTh.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
  133. package/dist/{vue-ui-spark-trend-B2XY2dRa.js → vue-ui-spark-trend-DOf7-cIf.js} +18 -18
  134. package/dist/{vue-ui-sparkbar-DWQN4gvR.js → vue-ui-sparkbar-D-MPA2zf.js} +3 -3
  135. package/dist/{vue-ui-sparkgauge-fDhQGQ12.js → vue-ui-sparkgauge-B9xRiVSU.js} +6 -6
  136. package/dist/{vue-ui-sparkhistogram-f7Acvipt.js → vue-ui-sparkhistogram-BWb0lqQP.js} +4 -4
  137. package/dist/{vue-ui-sparkline-Ys3JW7Ap.js → vue-ui-sparkline-BF-qr8Ti.js} +23 -23
  138. package/dist/{vue-ui-sparkstackbar-Dv0HeSna.js → vue-ui-sparkstackbar-DnCUpk50.js} +17 -17
  139. package/dist/vue-ui-stackbar-DvJ8Hahn.js +1695 -0
  140. package/dist/{vue-ui-strip-plot-DN13ntF-.js → vue-ui-strip-plot-SAh1gIs5.js} +52 -52
  141. package/dist/{vue-ui-table-Qb5tDX1n.js → vue-ui-table-BJdDfMYD.js} +18 -18
  142. package/dist/{vue-ui-table-heatmap-hMrgJ25a.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
  143. package/dist/{vue-ui-table-sparkline-CdkFyJjv.js → vue-ui-table-sparkline-BBFEJ8c6.js} +28 -28
  144. package/dist/{vue-ui-thermometer-D7U2C7kJ.js → vue-ui-thermometer-D8DH6QSN.js} +22 -22
  145. package/dist/{vue-ui-timer-KtA4M2mV.js → vue-ui-timer-CaUdAHBE.js} +29 -29
  146. package/dist/{vue-ui-tiremarks-C6GTGszq.js → vue-ui-tiremarks-_sUH1d3J.js} +14 -14
  147. package/dist/{vue-ui-treemap-rhnl1TW9.js → vue-ui-treemap-DXduzuW4.js} +78 -78
  148. package/dist/{vue-ui-vertical-bar-n_Lvbd_X.js → vue-ui-vertical-bar-JdjmgwQj.js} +94 -94
  149. package/dist/{vue-ui-waffle-D-4whGLN.js → vue-ui-waffle-h8zoi4Rc.js} +68 -68
  150. package/dist/{vue-ui-wheel-D92HLjfr.js → vue-ui-wheel-Ck1Mx37j.js} +21 -21
  151. package/dist/{vue-ui-word-cloud-Df9AMw6v.js → vue-ui-word-cloud-CjWvuukM.js} +47 -47
  152. package/dist/{vue-ui-world-Bg9S35ug.js → vue-ui-world-Dw71_Mu2.js} +6 -6
  153. package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
  154. package/dist/vue-ui-xy-tSMgXqqb.js +3375 -0
  155. package/package.json +2 -2
  156. package/dist/vue-ui-candlestick-DTWbbdGH.js +0 -1073
  157. package/dist/vue-ui-radar-Csznqw19.js +0 -891
  158. package/dist/vue-ui-stackbar-DUlN5QiM.js +0 -1457
  159. package/dist/vue-ui-xy-Da6oy2rm.js +0 -4527
  160. package/dist/vue-ui-xy-canvas-0CLSIKpO.js +0 -1305
@@ -1,1073 +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, watchEffect as jt, 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 Yt, mergeProps as qt, createTextVNode as tt } from "vue";
2
- import { c as Jt, t as Kt, B as le, o as lt, f as U, C as Qt, q, d as L, X as Zt, i as ae, s as el, D as at, x as tl, y as ll, z as al, A as ol } from "./lib-CSDxt1Zh.js";
3
- import { t as ot, u as sl } from "./useResponsive-DfdjqQps.js";
4
- import { u as ul, a as st } from "./useNestedProp-Dh-ldrr5.js";
5
- import { u as il } from "./usePrinter-Cq8Pt6Lh.js";
6
- import { u as nl, B as rl } from "./BaseScanner-BgWxam9d.js";
7
- import { u as vl } from "./useSvgExport-DrjCWun4.js";
8
- import { u as dl } from "./useTimeLabels-BGFjWgrv.js";
9
- import { u as cl } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as yl } from "./useChartAccessibility-9icAAmYg.js";
11
- import { u as hl } from "./useTimeLabelCollider-CIsgDrl9.js";
12
- import fl from "./img-DI-W68vp.js";
13
- import gl from "./Title-B6rAo9Oz.js";
14
- import { t as pl } from "./themes-Dw-dDudK.js";
15
- import { S as bl } from "./Slicer-BOki89CB.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-DG6cvf2h.js")), rt = R(() => import("./Tooltip-DaInVNiV.js")), vt = R(() => import("./vue-ui-accordion-CaClZrCp.js")), dt = R(() => import("./DataTable-DUpZ_s2c.js")), ct = R(() => import("./PenAndPaper-D9LruJaM.js")), yt = R(() => import("./UserOptions-CJXSEhan.js")), ht = R(() => import("./PackageVersion-CQvYRebC.js")), ft = R(() => import("./BaseDraggableDialog-Cysanw8-.js")), { vue_ui_candlestick: gt } = ul(), f = ut, oe = h(() => !!f.dataset && f.dataset.length), z = r(!1), se = r(null), A = r(Jt()), 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 } = nl({
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: Kt({
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 } = cl({ config: e.value }), { svgRef: ye } = yl({ 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 } = sl({
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 } = il({
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
- jt((t) => {
184
- const a = H.value;
185
- if (!a) return;
186
- const l = new ResizeObserver((o) => {
187
- bt(o[0].contentRect.height);
188
- });
189
- l.observe(a), t(() => l.disconnect());
190
- }), Ze(() => {
191
- fe.value = 0;
192
- });
193
- const Me = h(() => {
194
- let t = 0;
195
- return H.value && (t = fe.value + c.value.xAxisFontSize), t;
196
- });
197
- function mt() {
198
- let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
199
- return re.value && (t = Array.from(re.value.querySelectorAll("text")).reduce((o, b) => {
200
- const g = b.getComputedTextLength();
201
- return g > o ? g : o;
202
- }, 0)), t + 13;
203
- }
204
- const n = h(() => {
205
- const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, b = mt(), g = 12;
206
- return {
207
- top: t + g,
208
- right: c.value.width - a,
209
- left: o + b,
210
- bottom: c.value.height - l - Me.value,
211
- width: c.value.width - o - a - b,
212
- height: c.value.height - t - l - Me.value - g
213
- };
214
- }), X = h(() => C.value.length), v = r({
215
- start: 0,
216
- end: X.value
217
- }), Ue = h(() => C.value.map((t, a) => ({
218
- ...t,
219
- absoluteIndex: a
220
- })).slice(v.value.start, v.value.end)), ge = h(() => (C.value.forEach((t, a) => {
221
- [null, void 0].includes(t[0]) && U({
222
- componentName: "VueUiCandlestick",
223
- type: "datasetAttribute",
224
- property: "period (index 0)",
225
- index: a,
226
- debug: F.value
227
- }), [null, void 0].includes(t[1]) && U({
228
- componentName: "VueUiCandlestick",
229
- type: "datasetAttribute",
230
- property: "open (index 1)",
231
- index: a,
232
- debug: F.value
233
- }), [null, void 0].includes(t[2]) && U({
234
- componentName: "VueUiCandlestick",
235
- type: "datasetAttribute",
236
- property: "high (index 2)",
237
- index: a,
238
- debug: F.value
239
- }), [null, void 0].includes(t[3]) && U({
240
- componentName: "VueUiCandlestick",
241
- type: "datasetAttribute",
242
- property: "low (index 3)",
243
- index: a,
244
- debug: F.value
245
- }), [null, void 0].includes(t[4]) && U({
246
- componentName: "VueUiCandlestick",
247
- type: "datasetAttribute",
248
- property: "last (index 4)",
249
- index: a,
250
- debug: F.value
251
- }), [null, void 0].includes(t[5]) && U({
252
- componentName: "VueUiCandlestick",
253
- type: "datasetAttribute",
254
- property: "volume (index 5)",
255
- index: a,
256
- debug: F.value
257
- });
258
- }), Ue.value.map((t) => ({
259
- absoluteIndex: t.absoluteIndex,
260
- period: t[0],
261
- open: t[1],
262
- high: t[2],
263
- low: t[3],
264
- last: t[4],
265
- volume: t[5]
266
- })))), d = h(() => n.value.width / Ue.value.length), We = h(() => {
267
- 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;
268
- return {
269
- max: t,
270
- min: a
271
- };
272
- }), _ = h(() => Qt(We.value.min, We.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
273
- function K(t, a) {
274
- return {
275
- ...t,
276
- x: q(n.value.left + a * d.value + d.value / 2),
277
- y: q(n.value.top + (1 - (t - _.value.min) / (_.value.max - _.value.min)) * n.value.height),
278
- value: q(t)
279
- };
280
- }
281
- const w = h(() => ge.value.map((t, a) => {
282
- 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;
283
- return {
284
- period: t.period,
285
- open: l,
286
- high: o,
287
- low: b,
288
- last: g,
289
- volume: t.volume,
290
- isBullish: P,
291
- absoluteIndex: t.absoluteIndex
292
- };
293
- }));
294
- function xt(t) {
295
- return q((t - _.value.min) / (_.value.max - _.value.min));
296
- }
297
- const kt = h(() => _.value.ticks.map((t) => ({
298
- y: n.value.bottom - n.value.height * xt(t),
299
- value: q(t)
300
- }))), wt = h(() => ge.value.map((t) => t.period)), O = h(() => dl({
301
- values: C.value.map((t) => t[0]),
302
- maxDatapoints: C.value.length,
303
- formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
304
- start: v.value.start,
305
- end: v.value.end
306
- })), He = h(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
307
- start: O.value.find((t) => t.absoluteIndex === v.value.start).text,
308
- end: O.value.find((t) => t.absoluteIndex === v.value.end - 1).text
309
- } : {
310
- start: C.value[v.value.start] ? C.value[v.value.start][0] : C.value[0][0],
311
- end: C.value[v.value.end - 1] ? C.value[v.value.end - 1][0] : C.value.at(-1)[0]
312
- }), pe = r(null);
313
- function At(t, a) {
314
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: t + v.value.start });
315
- }
316
- function Ct(t, a) {
317
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: t + v.value.start }), ne.value = void 0, ue.value = !1;
318
- }
319
- function _t(t, a) {
320
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + v.value.start }), ne.value = t, pe.value = {
321
- datapoint: a,
322
- seriesIndex: t,
323
- series: w.value,
324
- config: e.value
325
- };
326
- const l = e.value.style.tooltip.customFormat;
327
- if (al(l) && ol(() => l({
328
- seriesIndex: t,
329
- datapoint: a,
330
- series: w.value,
331
- config: e.value
332
- })))
333
- ie.value = l({
334
- seriesIndex: t,
335
- datapoint: a,
336
- series: w.value,
337
- config: e.value
338
- });
339
- else if (e.value.style.tooltip.show) {
340
- let o = "";
341
- 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;
342
- 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}"
343
- 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}">`;
344
- const Mt = L({
345
- p: e.value.style.tooltip.prefix,
346
- v: g.value,
347
- s: e.value.style.tooltip.suffix,
348
- r: e.value.style.tooltip.roundingValue
349
- });
350
- o += `<div>${Dt}: <b>${Mt}</b></div>`;
351
- const Ut = L({
352
- p: e.value.style.tooltip.prefix,
353
- v: P.value,
354
- s: e.value.style.tooltip.suffix,
355
- r: e.value.style.tooltip.roundingValue
356
- });
357
- o += `<div>${Pt}: <b>${Ut}</b></div>`;
358
- const Wt = L({
359
- p: e.value.style.tooltip.prefix,
360
- v: ke.value,
361
- s: e.value.style.tooltip.suffix,
362
- r: e.value.style.tooltip.roundingValue
363
- });
364
- o += `<div>${Nt}: <b>${Wt}</b></div>`;
365
- const Ht = L({
366
- p: e.value.style.tooltip.prefix,
367
- v: we.value,
368
- s: e.value.style.tooltip.suffix,
369
- r: e.value.style.tooltip.roundingValue
370
- });
371
- o += `<div>${Bt}: <b>${Ht}</b></div>`, o += "</div>", ie.value = `<div style="text-align:right">${o}</div>`;
372
- }
373
- ue.value = !0;
374
- }
375
- function zt() {
376
- be();
377
- }
378
- const Ge = r(null);
379
- async function be() {
380
- await Ae(), await Ae();
381
- const { startIndex: t, endIndex: a } = e.value.style.zoom, l = Ge.value, o = X.value;
382
- 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);
383
- }
384
- function $t(t) {
385
- const a = X.value;
386
- 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;
387
- }
388
- function me(t = null) {
389
- Ae(() => {
390
- 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) => [
391
- e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? O.value[P].text : g.period,
392
- g.open.value,
393
- g.high.value,
394
- g.low.value,
395
- g.last.value,
396
- g.volume
397
- ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), b = tl(o);
398
- t ? t(b) : ll({ csvContent: b, title: e.value.style.title.text || "vue-ui-candlestick" });
399
- });
400
- }
401
- const Q = h(() => {
402
- const t = w.value.map((o, b) => {
403
- const g = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? O.value[b].text : o.period, P = L({
404
- p: e.value.table.td.prefix,
405
- v: o.open.value,
406
- s: e.value.table.td.suffix,
407
- r: e.value.table.td.roundingValue
408
- }), ke = L({
409
- p: e.value.table.td.prefix,
410
- v: o.high.value,
411
- s: e.value.table.td.suffix,
412
- r: e.value.table.td.roundingValue
413
- }), we = L({
414
- p: e.value.table.td.prefix,
415
- v: o.low.value,
416
- s: e.value.table.td.suffix,
417
- r: e.value.table.td.roundingValue
418
- }), ee = L({
419
- p: e.value.table.td.prefix,
420
- v: o.last.value,
421
- s: e.value.table.td.suffix,
422
- r: e.value.table.td.roundingValue
423
- });
424
- return [
425
- `<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}`,
426
- P,
427
- ke,
428
- we,
429
- ee,
430
- `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
431
- ];
432
- }), a = {
433
- th: {
434
- backgroundColor: e.value.table.th.backgroundColor,
435
- color: e.value.table.th.color,
436
- outline: e.value.table.th.outline
437
- },
438
- td: {
439
- backgroundColor: e.value.table.td.backgroundColor,
440
- color: e.value.table.td.color,
441
- outline: e.value.table.td.outline
442
- },
443
- breakpoint: e.value.table.responsiveBreakpoint
444
- }, l = [
445
- e.value.translations.period,
446
- e.value.translations.open,
447
- e.value.translations.high,
448
- e.value.translations.low,
449
- e.value.translations.last,
450
- e.value.translations.volume
451
- ];
452
- return { head: l, body: t, config: a, colNames: l };
453
- }), D = r(!1);
454
- function Xe(t) {
455
- D.value = t, ze.value += 1;
456
- }
457
- function je() {
458
- k.value.showTable = !k.value.showTable;
459
- }
460
- function Ye() {
461
- k.value.showTooltip = !k.value.showTooltip;
462
- }
463
- const Z = r(!1);
464
- function xe() {
465
- Z.value = !Z.value;
466
- }
467
- async function St({ scale: t = 2 } = {}) {
468
- if (!$.value) return;
469
- const { width: a, height: l } = $.value.getBoundingClientRect(), o = a / l, { imageUri: b, base64: g } = await fl({ domElement: $.value, base64: !0, img: !0, scale: t });
470
- return {
471
- imageUri: b,
472
- base64: g,
473
- title: e.value.style.title.text,
474
- width: a,
475
- height: l,
476
- aspectRatio: o
477
- };
478
- }
479
- const Tt = h(() => c.value.width), Lt = h(() => c.value.height);
480
- hl({
481
- timeLabelsEls: H,
482
- timeLabels: O,
483
- slicer: v,
484
- configRef: e,
485
- rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
486
- autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate", "enable"],
487
- isAutoSize: !1,
488
- rotation: e.value.style.layout.grid.xAxis.dataLabels.autoRotate.angle,
489
- width: Tt,
490
- height: Lt
491
- }), te(e, () => {
492
- k.value = {
493
- showTable: e.value.table.show,
494
- showTooltip: e.value.style.tooltip.show
495
- };
496
- }, { immediate: !0 });
497
- const j = h(() => {
498
- const t = e.value.table.useDialog && !e.value.table.show, a = k.value.showTable;
499
- return {
500
- component: t ? ft : vt,
501
- title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? `: ${e.value.style.title.subtitle.text}` : ""}`,
502
- props: t ? {
503
- backgroundColor: e.value.table.th.backgroundColor,
504
- color: e.value.table.th.color,
505
- headerColor: e.value.table.th.color,
506
- headerBg: e.value.table.th.backgroundColor,
507
- isFullscreen: D.value,
508
- fullscreenParent: $.value,
509
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
510
- } : {
511
- hideDetails: !0,
512
- config: {
513
- open: a,
514
- maxHeight: 1e4,
515
- body: {
516
- backgroundColor: e.value.style.backgroundColor,
517
- color: e.value.style.color
518
- },
519
- head: {
520
- backgroundColor: e.value.style.backgroundColor,
521
- color: e.value.style.color
522
- }
523
- }
524
- }
525
- };
526
- });
527
- te(() => k.value.showTable, (t) => {
528
- e.value.table.show || (t && e.value.table.useDialog && G.value ? G.value.open() : "close" in G.value && G.value.close());
529
- });
530
- function qe() {
531
- k.value.showTable = !1, ve.value && ve.value.setTableIconState(!1);
532
- }
533
- const It = h(() => e.value.style.backgroundColor), Rt = h(() => e.value.style.title), { exportSvg: Ft, getSvg: Ot } = vl({
534
- svg: ye,
535
- title: Rt,
536
- backgroundColor: It
537
- });
538
- async function Je({ isCb: t }) {
539
- if (t) {
540
- const { blob: a, url: l, text: o, dataUrl: b } = await Ot();
541
- e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: b });
542
- } else
543
- Ft();
544
- }
545
- return it({
546
- getImage: St,
547
- generatePdf: Ee,
548
- generateCsv: me,
549
- generateImage: Ve,
550
- generateSvg: Je,
551
- toggleTable: je,
552
- toggleTooltip: Ye,
553
- toggleAnnotator: xe,
554
- toggleFullscreen: Xe
555
- }), (t, a) => (s(), i("div", {
556
- ref_key: "candlestickChart",
557
- ref: $,
558
- class: T(`vue-data-ui-component vue-ui-candlestick ${D.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
559
- style: Ce(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
560
- id: `vue-ui-candlestick_${A.value}`,
561
- onMouseenter: a[3] || (a[3] = () => u(Oe)(!0)),
562
- onMouseleave: a[4] || (a[4] = () => u(Oe)(!1))
563
- }, [
564
- e.value.userOptions.buttons.annotator ? (s(), N(u(ct), {
565
- key: 0,
566
- svgRef: u(ye),
567
- backgroundColor: e.value.style.backgroundColor,
568
- color: e.value.style.color,
569
- active: Z.value,
570
- onClose: xe
571
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
572
- pt.value ? (s(), i("div", {
573
- key: 1,
574
- ref_key: "noTitle",
575
- ref: Ie,
576
- class: "vue-data-ui-no-title-space",
577
- style: "height:36px; width: 100%;background:transparent"
578
- }, null, 512)) : p("", !0),
579
- e.value.style.title.text ? (s(), i("div", {
580
- key: 2,
581
- ref_key: "chartTitle",
582
- ref: $e,
583
- style: "width:100%;background:transparent"
584
- }, [
585
- (s(), N(gl, {
586
- key: `title_${Fe.value}`,
587
- config: {
588
- title: {
589
- cy: "candlestick-div-title",
590
- ...e.value.style.title
591
- },
592
- subtitle: {
593
- cy: "candlestick-div-subtitle",
594
- ...e.value.style.title.subtitle
595
- }
596
- }
597
- }, null, 8, ["config"]))
598
- ], 512)) : p("", !0),
599
- e.value.userOptions.show && oe.value && (u(De) || u(ce)) ? (s(), N(u(yt), {
600
- ref_key: "userOptionsRef",
601
- ref: ve,
602
- key: `user_options_${ze.value}`,
603
- backgroundColor: e.value.style.backgroundColor,
604
- color: e.value.style.color,
605
- isImaging: u(Be),
606
- isPrinting: u(Ne),
607
- uid: A.value,
608
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
609
- hasPdf: e.value.userOptions.buttons.pdf,
610
- hasImg: e.value.userOptions.buttons.img,
611
- hasSvg: e.value.userOptions.buttons.svg,
612
- hasXls: e.value.userOptions.buttons.csv,
613
- hasTable: e.value.userOptions.buttons.table,
614
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
615
- isFullscreen: D.value,
616
- isTooltip: k.value.showTooltip,
617
- titles: { ...e.value.userOptions.buttonTitles },
618
- chartElement: $.value,
619
- position: e.value.userOptions.position,
620
- hasAnnotator: e.value.userOptions.buttons.annotator,
621
- isAnnotation: Z.value,
622
- callbacks: e.value.userOptions.callbacks,
623
- printScale: e.value.userOptions.print.scale,
624
- tableDialog: e.value.table.useDialog,
625
- onToggleFullscreen: Xe,
626
- onGeneratePdf: u(Ee),
627
- onGenerateCsv: me,
628
- onGenerateImage: u(Ve),
629
- onGenerateSvg: Je,
630
- onToggleTable: je,
631
- onToggleTooltip: Ye,
632
- onToggleAnnotator: xe,
633
- style: Ce({
634
- visibility: u(De) ? u(ce) ? "visible" : "hidden" : "visible"
635
- })
636
- }, et({ _: 2 }, [
637
- t.$slots.menuIcon ? {
638
- name: "menuIcon",
639
- fn: m(({ isOpen: l, color: o }) => [
640
- x(t.$slots, "menuIcon", B(E({ isOpen: l, color: o })), void 0, !0)
641
- ]),
642
- key: "0"
643
- } : void 0,
644
- t.$slots.optionTooltip ? {
645
- name: "optionTooltip",
646
- fn: m(() => [
647
- x(t.$slots, "optionTooltip", {}, void 0, !0)
648
- ]),
649
- key: "1"
650
- } : void 0,
651
- t.$slots.optionPdf ? {
652
- name: "optionPdf",
653
- fn: m(() => [
654
- x(t.$slots, "optionPdf", {}, void 0, !0)
655
- ]),
656
- key: "2"
657
- } : void 0,
658
- t.$slots.optionCsv ? {
659
- name: "optionCsv",
660
- fn: m(() => [
661
- x(t.$slots, "optionCsv", {}, void 0, !0)
662
- ]),
663
- key: "3"
664
- } : void 0,
665
- t.$slots.optionImg ? {
666
- name: "optionImg",
667
- fn: m(() => [
668
- x(t.$slots, "optionImg", {}, void 0, !0)
669
- ]),
670
- key: "4"
671
- } : void 0,
672
- t.$slots.optionTable ? {
673
- name: "optionTable",
674
- fn: m(() => [
675
- x(t.$slots, "optionTable", {}, void 0, !0)
676
- ]),
677
- key: "5"
678
- } : void 0,
679
- t.$slots.optionFullscreen ? {
680
- name: "optionFullscreen",
681
- fn: m(({ toggleFullscreen: l, isFullscreen: o }) => [
682
- x(t.$slots, "optionFullscreen", B(E({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
683
- ]),
684
- key: "6"
685
- } : void 0,
686
- t.$slots.optionAnnotator ? {
687
- name: "optionAnnotator",
688
- fn: m(({ toggleAnnotator: l, isAnnotator: o }) => [
689
- x(t.$slots, "optionAnnotator", B(E({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
690
- ]),
691
- key: "7"
692
- } : void 0
693
- ]), 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),
694
- (s(), i("svg", {
695
- ref_key: "svgRef",
696
- ref: ye,
697
- xmlns: u(Zt),
698
- "aria-label": e.value.style.title.text || "candlestick chart",
699
- class: T({ "vue-data-ui-fullscreen--on": D.value, "vue-data-ui-fulscreen--off": !D.value }),
700
- viewBox: `0 0 ${c.value.width <= 0 ? 10 : c.value.width} ${c.value.height <= 0 ? 10 : c.value.height}`,
701
- style: Ce(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
702
- }, [
703
- _e(u(ht)),
704
- t.$slots["chart-background"] ? (s(), i("foreignObject", {
705
- key: 0,
706
- x: n.value.left,
707
- y: n.value.top,
708
- width: Math.max(0.1, n.value.width),
709
- height: Math.max(0.1, n.value.height),
710
- style: {
711
- pointerEvents: "none"
712
- }
713
- }, [
714
- x(t.$slots, "chart-background", {}, void 0, !0)
715
- ], 8, wl)) : p("", !0),
716
- w.value.length > 0 ? (s(), i("g", Al, [
717
- y("defs", null, [
718
- y("linearGradient", {
719
- id: `bearish_gradient_${A.value}`,
720
- x2: "0%",
721
- y2: "100%"
722
- }, [
723
- y("stop", {
724
- offset: "0%",
725
- "stop-color": e.value.style.layout.candle.colors.bearish
726
- }, null, 8, _l),
727
- y("stop", {
728
- offset: "50%",
729
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
730
- }, null, 8, zl),
731
- y("stop", {
732
- offset: "100%",
733
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
734
- }, null, 8, $l)
735
- ], 8, Cl),
736
- y("linearGradient", {
737
- id: `bullish_gradient_${A.value}`,
738
- x2: "0%",
739
- y2: "100%"
740
- }, [
741
- y("stop", {
742
- offset: "0%",
743
- "stop-color": e.value.style.layout.candle.colors.bullish
744
- }, null, 8, Tl),
745
- y("stop", {
746
- offset: "50%",
747
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
748
- }, null, 8, Ll),
749
- y("stop", {
750
- offset: "100%",
751
- "stop-color": `${u(ae)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
752
- }, null, 8, Il)
753
- ], 8, Sl)
754
- ]),
755
- e.value.style.layout.grid.show ? (s(), i("g", Rl, [
756
- y("line", {
757
- x1: n.value.left,
758
- x2: n.value.left,
759
- y1: n.value.top,
760
- y2: n.value.bottom,
761
- stroke: e.value.style.layout.grid.stroke,
762
- "stroke-width": e.value.style.layout.grid.strokeWidth,
763
- "stroke-linecap": "round"
764
- }, null, 8, Fl),
765
- y("line", {
766
- x1: n.value.left,
767
- x2: n.value.right,
768
- y1: n.value.bottom,
769
- y2: n.value.bottom,
770
- stroke: e.value.style.layout.grid.stroke,
771
- "stroke-width": e.value.style.layout.grid.strokeWidth,
772
- "stroke-linecap": "round"
773
- }, null, 8, Ol)
774
- ])) : p("", !0),
775
- e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), i("g", {
776
- key: 1,
777
- ref_key: "scaleLabels",
778
- ref: re
779
- }, [
780
- (s(!0), i(V, null, M(kt.value, (l, o) => (s(), i("g", null, [
781
- l.value >= _.value.min && l.value <= _.value.max ? (s(), i("line", {
782
- key: 0,
783
- x1: n.value.left,
784
- x2: n.value.left - 5,
785
- y1: l.y,
786
- y2: l.y,
787
- stroke: e.value.style.layout.grid.stroke,
788
- "stroke-width": e.value.style.layout.grid.strokeWidth,
789
- "stroke-linecap": "round"
790
- }, null, 8, Dl)) : p("", !0),
791
- l.value >= _.value.min && l.value <= _.value.max ? (s(), i("text", {
792
- key: 1,
793
- x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
794
- y: l.y + c.value.yAxisFontSize / 3,
795
- "font-size": c.value.yAxisFontSize,
796
- "text-anchor": "end",
797
- fill: e.value.style.layout.grid.yAxis.dataLabels.color,
798
- "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
799
- }, Y(u(L)({
800
- p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
801
- v: l.value,
802
- s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
803
- r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
804
- })), 9, Pl)) : p("", !0)
805
- ]))), 256))
806
- ], 512)) : p("", !0),
807
- e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
808
- key: 2,
809
- ref_key: "timeLabelsEls",
810
- ref: H
811
- }, [
812
- (s(!0), i(V, null, M(wt.value, (l, o) => (s(), i("g", null, [
813
- y("text", {
814
- class: "vue-data-ui-time-label",
815
- 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})`,
816
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
817
- "font-size": c.value.xAxisFontSize,
818
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
819
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
820
- }, Y(l), 9, Nl)
821
- ]))), 256))
822
- ], 512)) : p("", !0),
823
- e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
824
- key: 3,
825
- ref_key: "timeLabelsEls",
826
- ref: H
827
- }, [
828
- (s(!0), i(V, null, M(O.value, (l, o) => (s(), i("g", null, [
829
- y("text", {
830
- class: "vue-data-ui-time-label",
831
- 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})`,
832
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
833
- "font-size": c.value.xAxisFontSize,
834
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
835
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
836
- }, Y(l.text), 9, Bl)
837
- ]))), 256))
838
- ], 512)) : p("", !0),
839
- y("g", null, [
840
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("g", null, [
841
- y("rect", {
842
- x: l.open.x - e.value.style.layout.wick.strokeWidth / 2,
843
- y: l.high.y,
844
- width: e.value.style.layout.wick.strokeWidth,
845
- height: Math.abs(l.high.y - l.low.y),
846
- fill: e.value.style.layout.wick.stroke,
847
- stroke: "none",
848
- rx: e.value.style.layout.wick.strokeWidth / 2,
849
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
850
- }, null, 10, El),
851
- e.value.style.layout.wick.extremity.shape === "circle" ? (s(), i("g", Vl, [
852
- y("circle", {
853
- cx: l.high.x,
854
- cy: l.high.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, Ml),
859
- y("circle", {
860
- cx: l.low.x,
861
- cy: l.low.y,
862
- r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
863
- fill: e.value.style.layout.wick.extremity.color,
864
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
865
- }, null, 10, Ul)
866
- ])) : p("", !0),
867
- e.value.style.layout.wick.extremity.shape === "line" ? (s(), i("g", Wl, [
868
- y("rect", {
869
- 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,
870
- y: l.high.y - e.value.style.layout.wick.strokeWidth / 2,
871
- 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)),
872
- height: e.value.style.layout.wick.strokeWidth,
873
- rx: e.value.style.layout.wick.strokeWidth / 2,
874
- fill: e.value.style.layout.wick.extremity.color,
875
- stroke: "none",
876
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
877
- }, null, 10, Hl),
878
- y("rect", {
879
- 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,
880
- y: l.low.y - e.value.style.layout.wick.strokeWidth / 2,
881
- 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)),
882
- height: e.value.style.layout.wick.strokeWidth,
883
- fill: e.value.style.layout.wick.extremity.color,
884
- stroke: "none",
885
- rx: e.value.style.layout.wick.strokeWidth / 2,
886
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
887
- }, null, 10, Gl)
888
- ])) : p("", !0)
889
- ]))), 256))
890
- ]),
891
- y("g", null, [
892
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
893
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
894
- y: l.isBullish ? l.last.y : l.open.y,
895
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
896
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
897
- fill: e.value.style.layout.candle.gradient.underlayer,
898
- rx: e.value.style.layout.candle.borderRadius,
899
- stroke: "none",
900
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
901
- }, null, 10, Xl))), 256)),
902
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
903
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
904
- y: l.isBullish ? l.last.y : l.open.y,
905
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
906
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
907
- 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,
908
- rx: e.value.style.layout.candle.borderRadius,
909
- stroke: e.value.style.layout.candle.stroke,
910
- "stroke-width": e.value.style.layout.candle.strokeWidth,
911
- "stroke-linecap": "round",
912
- "stroke-linejoin": "round",
913
- class: T({ "vue-data-ui-transition": z.value && !u(S) })
914
- }, null, 10, jl))), 256))
915
- ]),
916
- y("g", null, [
917
- (s(!0), i(V, null, M(w.value, (l, o) => (s(), i("rect", {
918
- x: n.value.left + o * d.value,
919
- y: n.value.top,
920
- height: n.value.height <= 0 ? 1e-4 : n.value.height,
921
- width: d.value <= 0 ? 1e-4 : d.value,
922
- fill: ne.value === o ? u(el)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
923
- onMouseover: () => _t(o, l),
924
- onMouseleave: () => Ct(o, l),
925
- onClick: () => At(o, l)
926
- }, null, 40, Yl))), 256))
927
- ])
928
- ])) : p("", !0),
929
- x(t.$slots, "svg", { svg: c.value }, void 0, !0)
930
- ], 14, kl)),
931
- t.$slots.watermark ? (s(), i("div", ql, [
932
- x(t.$slots, "watermark", B(E({ isPrinting: u(Ne) || u(Be) })), void 0, !0)
933
- ])) : p("", !0),
934
- e.value.style.zoom.show && oe.value ? (s(), i("div", {
935
- key: 5,
936
- ref_key: "chartSlicer",
937
- ref: Te
938
- }, [
939
- (s(), N(bl, {
940
- ref_key: "slicerComponent",
941
- ref: Ge,
942
- key: `slicer_${J.value}`,
943
- background: e.value.style.zoom.color,
944
- borderColor: e.value.style.backgroundColor,
945
- fontSize: e.value.style.zoom.fontSize,
946
- useResetSlot: e.value.style.zoom.useResetSlot,
947
- labelLeft: He.value.start,
948
- labelRight: He.value.end,
949
- textColor: e.value.style.color,
950
- inputColor: e.value.style.zoom.color,
951
- selectColor: e.value.style.zoom.highlightColor,
952
- max: X.value,
953
- min: 0,
954
- valueStart: v.value.start,
955
- valueEnd: v.value.end,
956
- start: v.value.start,
957
- "onUpdate:start": a[0] || (a[0] = (l) => v.value.start = l),
958
- end: v.value.end,
959
- "onUpdate:end": a[1] || (a[1] = (l) => v.value.end = l),
960
- refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
961
- refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : X.value,
962
- enableRangeHandles: e.value.style.zoom.enableRangeHandles,
963
- enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
964
- focusOnDrag: e.value.style.zoom.focusOnDrag,
965
- focusRangeRatio: e.value.style.zoom.focusRangeRatio,
966
- onReset: zt
967
- }, {
968
- "reset-action": m(({ reset: l }) => [
969
- x(t.$slots, "reset-action", B(E({ reset: l })), void 0, !0)
970
- ]),
971
- _: 3
972
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "focusOnDrag", "focusRangeRatio"]))
973
- ], 512)) : p("", !0),
974
- y("div", {
975
- ref_key: "chartLegend",
976
- ref: Se
977
- }, [
978
- x(t.$slots, "legend", { legend: w.value }, void 0, !0)
979
- ], 512),
980
- t.$slots.source ? (s(), i("div", {
981
- key: 6,
982
- ref_key: "source",
983
- ref: Le,
984
- dir: "auto"
985
- }, [
986
- x(t.$slots, "source", {}, void 0, !0)
987
- ], 512)) : p("", !0),
988
- _e(u(rt), {
989
- show: k.value.showTooltip && ue.value,
990
- backgroundColor: e.value.style.tooltip.backgroundColor,
991
- color: e.value.style.tooltip.color,
992
- borderRadius: e.value.style.tooltip.borderRadius,
993
- borderColor: e.value.style.tooltip.borderColor,
994
- borderWidth: e.value.style.tooltip.borderWidth,
995
- fontSize: e.value.style.tooltip.fontSize,
996
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
997
- position: e.value.style.tooltip.position,
998
- offsetY: e.value.style.tooltip.offsetY,
999
- parent: $.value,
1000
- content: ie.value,
1001
- isFullscreen: D.value,
1002
- isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
1003
- smooth: e.value.style.tooltip.smooth,
1004
- backdropFilter: e.value.style.tooltip.backdropFilter,
1005
- smoothForce: e.value.style.tooltip.smoothForce,
1006
- smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
1007
- }, {
1008
- "tooltip-before": m(() => [
1009
- x(t.$slots, "tooltip-before", B(E({ ...pe.value })), void 0, !0)
1010
- ]),
1011
- "tooltip-after": m(() => [
1012
- x(t.$slots, "tooltip-after", B(E({ ...pe.value })), void 0, !0)
1013
- ]),
1014
- _: 3
1015
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1016
- oe.value && e.value.userOptions.buttons.table ? (s(), N(Yt(j.value.component), qt({ key: 7 }, j.value.props, {
1017
- ref_key: "tableUnit",
1018
- ref: G,
1019
- onClose: qe
1020
- }), et({
1021
- content: m(() => [
1022
- (s(), N(u(dt), {
1023
- key: `table_${Re.value}`,
1024
- colNames: Q.value.colNames,
1025
- head: Q.value.head,
1026
- body: Q.value.body,
1027
- config: Q.value.config,
1028
- title: e.value.table.useDialog ? "" : j.value.title,
1029
- withCloseButton: !e.value.table.useDialog,
1030
- onClose: qe
1031
- }, {
1032
- th: m(({ th: l }) => [
1033
- tt(Y(l), 1)
1034
- ]),
1035
- td: m(({ td: l }) => [
1036
- y("div", { innerHTML: l }, null, 8, Jl)
1037
- ]),
1038
- _: 1
1039
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1040
- ]),
1041
- _: 2
1042
- }, [
1043
- e.value.table.useDialog ? {
1044
- name: "title",
1045
- fn: m(() => [
1046
- tt(Y(j.value.title), 1)
1047
- ]),
1048
- key: "0"
1049
- } : void 0,
1050
- e.value.table.useDialog ? {
1051
- name: "actions",
1052
- fn: m(() => [
1053
- y("button", {
1054
- tabindex: "0",
1055
- class: "vue-ui-user-options-button",
1056
- onClick: a[2] || (a[2] = (l) => me(e.value.userOptions.callbacks.csv))
1057
- }, [
1058
- _e(u(nt), {
1059
- name: "excel",
1060
- stroke: j.value.props.color
1061
- }, null, 8, ["stroke"])
1062
- ])
1063
- ]),
1064
- key: "1"
1065
- } : void 0
1066
- ]), 1040)) : p("", !0),
1067
- u(S) ? (s(), N(rl, { key: 8 })) : p("", !0)
1068
- ], 46, xl));
1069
- }
1070
- }, fa = /* @__PURE__ */ ml(Kl, [["__scopeId", "data-v-2c20d4e0"]]);
1071
- export {
1072
- fa as default
1073
- };