vue-data-ui 3.0.0-next.9 → 3.0.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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -0,0 +1,1000 @@
1
+ import { defineAsyncComponent as D, computed as g, ref as r, toRefs as Rt, watch as pe, shallowRef as Xe, onMounted as Ot, onBeforeUnmount as je, watchEffect as Nt, nextTick as be, createElementBlock as i, openBlock as s, unref as u, normalizeStyle as me, normalizeClass as L, createBlock as N, createCommentVNode as p, createElementVNode as c, createVNode as Ye, createSlots as Pt, withCtx as x, renderSlot as b, normalizeProps as P, guardReactiveProps as E, Fragment as V, renderList as B, toDisplayString as Q, createTextVNode as Et } from "vue";
2
+ import { u as Vt, c as Bt, t as Mt, b as Ut, C as Z, o as qe, f as M, D as Wt, h as X, i as S, X as Dt, x as ee, s as Ht, E as Je, v as Gt, w as Xt, y as jt, z as Yt } from "./index-BtNwOUja.js";
3
+ import { t as Ke, u as qt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Qe } from "./useNestedProp-f2H3m6Yj.js";
5
+ import { u as Jt } from "./usePrinter-DUNjpQNe.js";
6
+ import { u as Kt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Qt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import { u as Zt, B as el } from "./useLoading-D7YHNtLX.js";
9
+ import tl from "./Title-BGu6gEd2.js";
10
+ import { S as ll } from "./Slicer-MID8pgT3.js";
11
+ import { u as al } from "./useTimeLabels-DkzmKfZn.js";
12
+ import ol from "./img-DrR839Ot.js";
13
+ import { u as sl } from "./useTimeLabelCollider-CIsgDrl9.js";
14
+ import { _ as ul } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ const il = ["id"], nl = ["xmlns", "aria-label", "viewBox"], rl = ["x", "y", "width", "height"], vl = { key: 1 }, dl = ["id"], yl = ["stop-color"], cl = ["stop-color"], hl = ["stop-color"], fl = ["id"], gl = ["stop-color"], pl = ["stop-color"], bl = ["stop-color"], ml = { key: 0 }, xl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], wl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Al = ["x", "y", "font-size", "fill", "font-weight"], _l = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Cl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], $l = ["x", "y", "width", "height", "fill", "rx"], zl = { key: 0 }, Ll = ["cx", "cy", "r", "fill"], Sl = ["cx", "cy", "r", "fill"], Tl = { key: 1 }, Il = ["x", "y", "width", "height", "rx", "fill"], Fl = ["x", "y", "width", "height", "fill", "rx"], Rl = ["x", "y", "height", "width", "fill", "rx"], Ol = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Nl = ["x", "y", "height", "width", "fill", "onMouseover", "onMouseleave", "onClick"], Pl = {
16
+ key: 4,
17
+ class: "vue-data-ui-watermark"
18
+ }, El = ["innerHTML"], Vl = {
19
+ __name: "vue-ui-candlestick",
20
+ props: {
21
+ config: {
22
+ type: Object,
23
+ default() {
24
+ return {};
25
+ }
26
+ },
27
+ dataset: {
28
+ type: Array,
29
+ default() {
30
+ return [];
31
+ }
32
+ }
33
+ },
34
+ setup(Ze, { expose: et }) {
35
+ const tt = D(() => import("./vue-ui-accordion-BKUrAowe.js")), lt = D(() => import("./DataTable-BSSXpM7w.js")), at = D(() => import("./PackageVersion-CJ6Vd7V5.js")), ot = D(() => import("./PenAndPaper-D3zudcNI.js")), st = D(() => import("./Tooltip-Bh2zYSoM.js")), ut = D(() => import("./UserOptions-Ck8fz9f4.js")), { vue_ui_candlestick: it } = Vt(), h = Ze, te = g(() => !!h.dataset && h.dataset.length), $ = r(!1), le = r(null), w = r(Bt()), nt = r(null), ae = r(!1), oe = r(""), se = r(void 0), xe = r(0), T = r(null), ke = r(null), we = r(null), Ae = r(null), _e = r(null), Ce = r(null), j = r(0), $e = r(0), ze = r(0), ue = r(null), H = r(null), e = r(re()), { loading: z, FINAL_DATASET: A, manualLoading: ie } = Zt({
36
+ ...Rt(h),
37
+ FINAL_CONFIG: e,
38
+ prepareConfig: re,
39
+ callback: () => {
40
+ Promise.resolve().then(async () => {
41
+ await ce();
42
+ });
43
+ },
44
+ skeletonDataset: [
45
+ [17040672e5, 10, 20, 2, 10, 30],
46
+ [17067456e5, 10, 30, 5, 20, 50],
47
+ [17092512e5, 20, 50, 10, 30, 80],
48
+ [17119296e5, 30, 80, 20, 50, 130],
49
+ [17145216e5, 50, 130, 30, 100, 210],
50
+ [17172e8, 80, 210, 50, 150, 340],
51
+ [1719792e6, 130, 340, 80, 280, 550],
52
+ [17224704e5, 210, 550, 130, 450, 890],
53
+ [17251488e5, 340, 890, 210, 750, 1440],
54
+ [17277408e5, 550, 1440, 340, 1230, 2330],
55
+ [17304192e5, 890, 2330, 550, 1950, 3770],
56
+ [17330112e5, 1440, 3770, 890, 3200, 5100]
57
+ ],
58
+ skeletonConfig: Mt({
59
+ defaultConfig: e.value,
60
+ userConfig: {
61
+ useCssAnimation: !1,
62
+ userOptions: { show: !1 },
63
+ table: { show: !1 },
64
+ style: {
65
+ backgroundColor: "#99999930",
66
+ layout: {
67
+ candle: {
68
+ colors: {
69
+ bearish: "#BABABA",
70
+ bullish: "#CACACA"
71
+ }
72
+ },
73
+ grid: {
74
+ stroke: "#6A6A6A",
75
+ yAxis: {
76
+ dataLabels: { show: !1 },
77
+ scale: {
78
+ min: null,
79
+ max: null
80
+ }
81
+ }
82
+ },
83
+ wick: {
84
+ stroke: "#6A6A6A",
85
+ extremity: {
86
+ color: "#6A6A6A"
87
+ }
88
+ }
89
+ },
90
+ tooltip: { show: !1 },
91
+ zoom: {
92
+ show: !1,
93
+ startIndex: null,
94
+ endIndex: null
95
+ }
96
+ }
97
+ }
98
+ })
99
+ }), { userOptionsVisible: ne, setUserOptionsVisibility: Le, keepUserOptionState: Se } = Kt({ config: e.value }), { svgRef: Te } = Qt({ config: e.value.style.title });
100
+ function re() {
101
+ const t = Qe({
102
+ userConfig: h.config,
103
+ defaultConfig: it
104
+ });
105
+ let a = {};
106
+ return t.theme ? a = {
107
+ ...Qe({
108
+ userConfig: Ut.vue_ui_candlestick[t.theme] || h.config,
109
+ defaultConfig: t
110
+ })
111
+ } : a = t, h.config && Z(h.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = h.config.style.zoom.startIndex : a.style.zoom.startIndex = null, h.config && Z(h.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = h.config.style.zoom.endIndex : a.style.zoom.endIndex = null, h.config && Z(h.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = h.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, h.config && Z(h.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = h.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
112
+ }
113
+ pe(() => h.config, (t) => {
114
+ z.value || (e.value = re()), ne.value = !e.value.userOptions.showOnChartHover, Ie(), j.value += 1, ze.value += 1, $e.value += 1, _.value.showTable = e.value.table.show, _.value.showTooltip = e.value.style.tooltip.show;
115
+ }, { deep: !0 }), pe(() => h.dataset, (t) => {
116
+ Array.isArray(t) && t.length > 0 && (ie.value = !1), y.value.start = 0, y.value.end = t.length, j.value += 1;
117
+ }, { deep: !0 });
118
+ const d = r({
119
+ height: e.value.style.height,
120
+ width: e.value.style.width,
121
+ xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
122
+ yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
123
+ }), I = Xe(null), U = Xe(null);
124
+ Ot(() => {
125
+ Ie();
126
+ });
127
+ const F = g(() => !!e.value.debug);
128
+ function Ie() {
129
+ if (qe(h.dataset) && (M({
130
+ componentName: "VueUiCandlestick",
131
+ type: "dataset",
132
+ debug: F.value
133
+ }), ie.value = !0), qe(h.dataset) || (ie.value = e.value.loading), setTimeout(() => {
134
+ $.value = !0;
135
+ }, 10), e.value.responsive) {
136
+ const a = Ke(() => {
137
+ $.value = !1;
138
+ const { width: l, height: o } = qt({
139
+ chart: T.value,
140
+ title: e.value.style.title.text ? ke.value : null,
141
+ slicer: Ae.value,
142
+ legend: we.value,
143
+ source: _e.value,
144
+ noTitle: Ce.value
145
+ });
146
+ requestAnimationFrame(() => {
147
+ d.value.width = l, d.value.height = o - 12, e.value.responsiveProportionalSizing ? (d.value.xAxisFontSize = Je({
148
+ relator: Math.min(l, o),
149
+ adjuster: e.value.style.width,
150
+ source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
151
+ threshold: 6,
152
+ fallback: 6
153
+ }), d.value.yAxisFontSize = Je({
154
+ relator: Math.min(l, o),
155
+ adjuster: e.value.style.width,
156
+ source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
157
+ threshold: 6,
158
+ fallback: 6
159
+ })) : (d.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, d.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize), le.value && clearTimeout(le.value), le.value = setTimeout(() => {
160
+ $.value = !0;
161
+ }, 10);
162
+ });
163
+ });
164
+ I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect()), I.value = new ResizeObserver(a), U.value = T.value.parentNode, I.value.observe(U.value);
165
+ }
166
+ ce();
167
+ }
168
+ je(() => {
169
+ I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect());
170
+ });
171
+ const { isPrinting: Fe, isImaging: Re, generatePdf: Oe, generateImage: Ne } = Jt({
172
+ elementId: `vue-ui-candlestick_${w.value}`,
173
+ fileName: e.value.style.title.text || "vue-ui-candlestick",
174
+ options: e.value.userOptions.print
175
+ }), rt = g(() => e.value.userOptions.show && !e.value.style.title.text), _ = r({
176
+ showTable: e.value.table.show,
177
+ showTooltip: e.value.style.tooltip.show
178
+ }), ve = r(0), vt = Ke((t) => {
179
+ ve.value = t;
180
+ }, 100);
181
+ Nt((t) => {
182
+ const a = H.value;
183
+ if (!a) return;
184
+ const l = new ResizeObserver((o) => {
185
+ vt(o[0].contentRect.height);
186
+ });
187
+ l.observe(a), t(() => l.disconnect());
188
+ }), je(() => {
189
+ ve.value = 0;
190
+ });
191
+ const Pe = g(() => {
192
+ let t = 0;
193
+ return H.value && (t = ve.value + d.value.xAxisFontSize), t;
194
+ });
195
+ function dt() {
196
+ let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
197
+ return ue.value && (t = Array.from(ue.value.querySelectorAll("text")).reduce((o, m) => {
198
+ const f = m.getComputedTextLength();
199
+ return f > o ? f : o;
200
+ }, 0)), t + 13;
201
+ }
202
+ const n = g(() => {
203
+ const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, m = dt(), f = 12;
204
+ return {
205
+ top: t + f,
206
+ right: d.value.width - a,
207
+ left: o + m,
208
+ bottom: d.value.height - l - Pe.value,
209
+ width: d.value.width - o - a - m,
210
+ height: d.value.height - t - l - Pe.value - f
211
+ };
212
+ }), G = g(() => A.value.length), y = r({
213
+ start: 0,
214
+ end: G.value
215
+ }), Ee = g(() => A.value.map((t, a) => ({
216
+ ...t,
217
+ absoluteIndex: a
218
+ })).slice(y.value.start, y.value.end)), de = g(() => (A.value.forEach((t, a) => {
219
+ [null, void 0].includes(t[0]) && M({
220
+ componentName: "VueUiCandlestick",
221
+ type: "datasetAttribute",
222
+ property: "period (index 0)",
223
+ index: a,
224
+ debug: F.value
225
+ }), [null, void 0].includes(t[1]) && M({
226
+ componentName: "VueUiCandlestick",
227
+ type: "datasetAttribute",
228
+ property: "open (index 1)",
229
+ index: a,
230
+ debug: F.value
231
+ }), [null, void 0].includes(t[2]) && M({
232
+ componentName: "VueUiCandlestick",
233
+ type: "datasetAttribute",
234
+ property: "high (index 2)",
235
+ index: a,
236
+ debug: F.value
237
+ }), [null, void 0].includes(t[3]) && M({
238
+ componentName: "VueUiCandlestick",
239
+ type: "datasetAttribute",
240
+ property: "low (index 3)",
241
+ index: a,
242
+ debug: F.value
243
+ }), [null, void 0].includes(t[4]) && M({
244
+ componentName: "VueUiCandlestick",
245
+ type: "datasetAttribute",
246
+ property: "last (index 4)",
247
+ index: a,
248
+ debug: F.value
249
+ }), [null, void 0].includes(t[5]) && M({
250
+ componentName: "VueUiCandlestick",
251
+ type: "datasetAttribute",
252
+ property: "volume (index 5)",
253
+ index: a,
254
+ debug: F.value
255
+ });
256
+ }), Ee.value.map((t) => ({
257
+ absoluteIndex: t.absoluteIndex,
258
+ period: t[0],
259
+ open: t[1],
260
+ high: t[2],
261
+ low: t[3],
262
+ last: t[4],
263
+ volume: t[5]
264
+ })))), v = g(() => n.value.width / Ee.value.length), Ve = g(() => {
265
+ const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...de.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;
266
+ return {
267
+ max: t,
268
+ min: a
269
+ };
270
+ }), C = g(() => Wt(Ve.value.min, Ve.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
271
+ function Y(t, a) {
272
+ return {
273
+ ...t,
274
+ x: X(n.value.left + a * v.value + v.value / 2),
275
+ y: X(n.value.top + (1 - (t - C.value.min) / (C.value.max - C.value.min)) * n.value.height),
276
+ value: X(t)
277
+ };
278
+ }
279
+ const k = g(() => de.value.map((t, a) => {
280
+ const l = Y(t.open, a), o = Y(t.high, a), m = Y(t.low, a), f = Y(t.last, a), O = t.last > t.open;
281
+ return {
282
+ period: t.period,
283
+ open: l,
284
+ high: o,
285
+ low: m,
286
+ last: f,
287
+ volume: t.volume,
288
+ isBullish: O,
289
+ absoluteIndex: t.absoluteIndex
290
+ };
291
+ }));
292
+ function yt(t) {
293
+ return X((t - C.value.min) / (C.value.max - C.value.min));
294
+ }
295
+ const ct = g(() => C.value.ticks.map((t) => ({
296
+ y: n.value.bottom - n.value.height * yt(t),
297
+ value: X(t)
298
+ }))), ht = g(() => de.value.map((t) => t.period)), R = g(() => al({
299
+ values: A.value.map((t) => t[0]),
300
+ maxDatapoints: A.value.length,
301
+ formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
302
+ start: y.value.start,
303
+ end: y.value.end
304
+ })), Be = g(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
305
+ start: R.value.find((t) => t.absoluteIndex === y.value.start).text,
306
+ end: R.value.find((t) => t.absoluteIndex === y.value.end - 1).text
307
+ } : {
308
+ start: A.value[y.value.start] ? A.value[y.value.start][0] : A.value[0][0],
309
+ end: A.value[y.value.end - 1] ? A.value[y.value.end - 1][0] : A.value.at(-1)[0]
310
+ }), ye = r(null);
311
+ function ft(t, a) {
312
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: t + y.value.start });
313
+ }
314
+ function gt(t, a) {
315
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: t + y.value.start }), se.value = void 0, ae.value = !1;
316
+ }
317
+ function pt(t, a) {
318
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + y.value.start }), se.value = t, ye.value = {
319
+ datapoint: a,
320
+ seriesIndex: t,
321
+ series: k.value,
322
+ config: e.value
323
+ };
324
+ const l = e.value.style.tooltip.customFormat;
325
+ if (jt(l) && Yt(() => l({
326
+ seriesIndex: t,
327
+ datapoint: a,
328
+ series: k.value,
329
+ config: e.value
330
+ })))
331
+ oe.value = l({
332
+ seriesIndex: t,
333
+ datapoint: a,
334
+ series: k.value,
335
+ config: e.value
336
+ });
337
+ else if (e.value.style.tooltip.show) {
338
+ let o = "";
339
+ const { period: m, open: f, high: O, low: fe, last: ge, volume: K, isBullish: Ge } = k.value[t], { period: Bl, open: At, high: _t, low: Ct, last: $t, volume: zt } = e.value.translations, Lt = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[t].text : m;
340
+ 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}"
341
+ fill="${e.value.style.layout.candle.gradient.show ? Ge ? `url(#bullish_gradient_${w.value})` : `url(#bearish_gradient_${w.value})` : Ge ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${Lt}</div>`, o += `${zt} : <b>${isNaN(K) ? "-" : Number(K.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}">`;
342
+ const St = S({
343
+ p: e.value.style.tooltip.prefix,
344
+ v: f.value,
345
+ s: e.value.style.tooltip.suffix,
346
+ r: e.value.style.tooltip.roundingValue
347
+ });
348
+ o += `<div>${At}: <b>${St}</b></div>`;
349
+ const Tt = S({
350
+ p: e.value.style.tooltip.prefix,
351
+ v: O.value,
352
+ s: e.value.style.tooltip.suffix,
353
+ r: e.value.style.tooltip.roundingValue
354
+ });
355
+ o += `<div>${_t}: <b>${Tt}</b></div>`;
356
+ const It = S({
357
+ p: e.value.style.tooltip.prefix,
358
+ v: fe.value,
359
+ s: e.value.style.tooltip.suffix,
360
+ r: e.value.style.tooltip.roundingValue
361
+ });
362
+ o += `<div>${Ct}: <b>${It}</b></div>`;
363
+ const Ft = S({
364
+ p: e.value.style.tooltip.prefix,
365
+ v: ge.value,
366
+ s: e.value.style.tooltip.suffix,
367
+ r: e.value.style.tooltip.roundingValue
368
+ });
369
+ o += `<div>${$t}: <b>${Ft}</b></div>`, o += "</div>", oe.value = `<div style="text-align:right">${o}</div>`;
370
+ }
371
+ ae.value = !0;
372
+ }
373
+ function bt() {
374
+ ce();
375
+ }
376
+ const Me = r(null);
377
+ async function ce() {
378
+ await be(), await be();
379
+ const { startIndex: t, endIndex: a } = e.value.style.zoom, l = Me.value, o = G.value;
380
+ (t != null || a != null) && l ? (t != null && l.setStartValue(t), a != null && l.setEndValue(mt(a + 1))) : (y.value = { start: 0, end: o }, j.value += 1);
381
+ }
382
+ function mt(t) {
383
+ const a = G.value;
384
+ 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;
385
+ }
386
+ function Ue(t = null) {
387
+ be(() => {
388
+ 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 = k.value.map((f, O) => [
389
+ e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[O].text : f.period,
390
+ f.open.value,
391
+ f.high.value,
392
+ f.low.value,
393
+ f.last.value,
394
+ f.volume
395
+ ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), m = Gt(o);
396
+ t ? t(m) : Xt({ csvContent: m, title: e.value.style.title.text || "vue-ui-candlestick" });
397
+ });
398
+ }
399
+ const q = g(() => {
400
+ const t = k.value.map((o, m) => {
401
+ const f = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[m].text : o.period, O = S({
402
+ p: e.value.table.td.prefix,
403
+ v: o.open.value,
404
+ s: e.value.table.td.suffix,
405
+ r: e.value.table.td.roundingValue
406
+ }), fe = S({
407
+ p: e.value.table.td.prefix,
408
+ v: o.high.value,
409
+ s: e.value.table.td.suffix,
410
+ r: e.value.table.td.roundingValue
411
+ }), ge = S({
412
+ p: e.value.table.td.prefix,
413
+ v: o.low.value,
414
+ s: e.value.table.td.suffix,
415
+ r: e.value.table.td.roundingValue
416
+ }), K = S({
417
+ p: e.value.table.td.prefix,
418
+ v: o.last.value,
419
+ s: e.value.table.td.suffix,
420
+ r: e.value.table.td.roundingValue
421
+ });
422
+ return [
423
+ `<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_${w.value}` : `url(#bearish_gradient_${w.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${f}`,
424
+ O,
425
+ fe,
426
+ ge,
427
+ K,
428
+ `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
429
+ ];
430
+ }), a = {
431
+ th: {
432
+ backgroundColor: e.value.table.th.backgroundColor,
433
+ color: e.value.table.th.color,
434
+ outline: e.value.table.th.outline
435
+ },
436
+ td: {
437
+ backgroundColor: e.value.table.td.backgroundColor,
438
+ color: e.value.table.td.color,
439
+ outline: e.value.table.td.outline
440
+ },
441
+ breakpoint: e.value.table.responsiveBreakpoint
442
+ }, l = [
443
+ e.value.translations.period,
444
+ e.value.translations.open,
445
+ e.value.translations.high,
446
+ e.value.translations.low,
447
+ e.value.translations.last,
448
+ e.value.translations.volume
449
+ ];
450
+ return { head: l, body: t, config: a, colNames: l };
451
+ }), W = r(!1);
452
+ function We(t) {
453
+ W.value = t, xe.value += 1;
454
+ }
455
+ function De() {
456
+ _.value.showTable = !_.value.showTable;
457
+ }
458
+ function He() {
459
+ _.value.showTooltip = !_.value.showTooltip;
460
+ }
461
+ const J = r(!1);
462
+ function he() {
463
+ J.value = !J.value;
464
+ }
465
+ async function xt({ scale: t = 2 } = {}) {
466
+ if (!T.value) return;
467
+ const { width: a, height: l } = T.value.getBoundingClientRect(), o = a / l, { imageUri: m, base64: f } = await ol({ domElement: T.value, base64: !0, img: !0, scale: t });
468
+ return {
469
+ imageUri: m,
470
+ base64: f,
471
+ title: e.value.style.title.text,
472
+ width: a,
473
+ height: l,
474
+ aspectRatio: o
475
+ };
476
+ }
477
+ const kt = g(() => d.value.width), wt = g(() => d.value.height);
478
+ return sl({
479
+ timeLabelsEls: H,
480
+ timeLabels: R,
481
+ slicer: y,
482
+ configRef: e,
483
+ rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
484
+ autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate", "enable"],
485
+ isAutoSize: !1,
486
+ rotation: e.value.style.layout.grid.xAxis.dataLabels.autoRotate.angle,
487
+ width: kt,
488
+ height: wt
489
+ }), pe(e, () => {
490
+ _.value = {
491
+ showTable: e.value.table.show,
492
+ showTooltip: e.value.style.tooltip.show
493
+ };
494
+ }, { immediate: !0 }), et({
495
+ getImage: xt,
496
+ generatePdf: Oe,
497
+ generateCsv: Ue,
498
+ generateImage: Ne,
499
+ toggleTable: De,
500
+ toggleTooltip: He,
501
+ toggleAnnotator: he,
502
+ toggleFullscreen: We
503
+ }), (t, a) => (s(), i("div", {
504
+ ref_key: "candlestickChart",
505
+ ref: T,
506
+ class: L(`vue-ui-candlestick ${W.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
507
+ style: me(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
508
+ id: `vue-ui-candlestick_${w.value}`,
509
+ onMouseenter: a[3] || (a[3] = () => u(Le)(!0)),
510
+ onMouseleave: a[4] || (a[4] = () => u(Le)(!1))
511
+ }, [
512
+ e.value.userOptions.buttons.annotator ? (s(), N(u(ot), {
513
+ key: 0,
514
+ svgRef: u(Te),
515
+ backgroundColor: e.value.style.backgroundColor,
516
+ color: e.value.style.color,
517
+ active: J.value,
518
+ onClose: he
519
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
520
+ rt.value ? (s(), i("div", {
521
+ key: 1,
522
+ ref_key: "noTitle",
523
+ ref: Ce,
524
+ class: "vue-data-ui-no-title-space",
525
+ style: "height:36px; width: 100%;background:transparent"
526
+ }, null, 512)) : p("", !0),
527
+ e.value.style.title.text ? (s(), i("div", {
528
+ key: 2,
529
+ ref_key: "chartTitle",
530
+ ref: ke,
531
+ style: "width:100%;background:transparent"
532
+ }, [
533
+ (s(), N(tl, {
534
+ key: `title_${ze.value}`,
535
+ config: {
536
+ title: {
537
+ cy: "candlestick-div-title",
538
+ ...e.value.style.title
539
+ },
540
+ subtitle: {
541
+ cy: "candlestick-div-subtitle",
542
+ ...e.value.style.title.subtitle
543
+ }
544
+ }
545
+ }, null, 8, ["config"]))
546
+ ], 512)) : p("", !0),
547
+ e.value.userOptions.show && te.value && (u(Se) || u(ne)) ? (s(), N(u(ut), {
548
+ ref_key: "details",
549
+ ref: nt,
550
+ key: `user_options_${xe.value}`,
551
+ backgroundColor: e.value.style.backgroundColor,
552
+ color: e.value.style.color,
553
+ isImaging: u(Re),
554
+ isPrinting: u(Fe),
555
+ uid: w.value,
556
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
557
+ hasPdf: e.value.userOptions.buttons.pdf,
558
+ hasImg: e.value.userOptions.buttons.img,
559
+ hasXls: e.value.userOptions.buttons.csv,
560
+ hasTable: e.value.userOptions.buttons.table,
561
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
562
+ isFullscreen: W.value,
563
+ isTooltip: _.value.showTooltip,
564
+ titles: { ...e.value.userOptions.buttonTitles },
565
+ chartElement: T.value,
566
+ position: e.value.userOptions.position,
567
+ hasAnnotator: e.value.userOptions.buttons.annotator,
568
+ isAnnotation: J.value,
569
+ callbacks: e.value.userOptions.callbacks,
570
+ printScale: e.value.userOptions.print.scale,
571
+ onToggleFullscreen: We,
572
+ onGeneratePdf: u(Oe),
573
+ onGenerateCsv: Ue,
574
+ onGenerateImage: u(Ne),
575
+ onToggleTable: De,
576
+ onToggleTooltip: He,
577
+ onToggleAnnotator: he,
578
+ style: me({
579
+ visibility: u(Se) ? u(ne) ? "visible" : "hidden" : "visible"
580
+ })
581
+ }, Pt({ _: 2 }, [
582
+ t.$slots.menuIcon ? {
583
+ name: "menuIcon",
584
+ fn: x(({ isOpen: l, color: o }) => [
585
+ b(t.$slots, "menuIcon", P(E({ isOpen: l, color: o })), void 0, !0)
586
+ ]),
587
+ key: "0"
588
+ } : void 0,
589
+ t.$slots.optionTooltip ? {
590
+ name: "optionTooltip",
591
+ fn: x(() => [
592
+ b(t.$slots, "optionTooltip", {}, void 0, !0)
593
+ ]),
594
+ key: "1"
595
+ } : void 0,
596
+ t.$slots.optionPdf ? {
597
+ name: "optionPdf",
598
+ fn: x(() => [
599
+ b(t.$slots, "optionPdf", {}, void 0, !0)
600
+ ]),
601
+ key: "2"
602
+ } : void 0,
603
+ t.$slots.optionCsv ? {
604
+ name: "optionCsv",
605
+ fn: x(() => [
606
+ b(t.$slots, "optionCsv", {}, void 0, !0)
607
+ ]),
608
+ key: "3"
609
+ } : void 0,
610
+ t.$slots.optionImg ? {
611
+ name: "optionImg",
612
+ fn: x(() => [
613
+ b(t.$slots, "optionImg", {}, void 0, !0)
614
+ ]),
615
+ key: "4"
616
+ } : void 0,
617
+ t.$slots.optionTable ? {
618
+ name: "optionTable",
619
+ fn: x(() => [
620
+ b(t.$slots, "optionTable", {}, void 0, !0)
621
+ ]),
622
+ key: "5"
623
+ } : void 0,
624
+ t.$slots.optionFullscreen ? {
625
+ name: "optionFullscreen",
626
+ fn: x(({ toggleFullscreen: l, isFullscreen: o }) => [
627
+ b(t.$slots, "optionFullscreen", P(E({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
628
+ ]),
629
+ key: "6"
630
+ } : void 0,
631
+ t.$slots.optionAnnotator ? {
632
+ name: "optionAnnotator",
633
+ fn: x(({ toggleAnnotator: l, isAnnotator: o }) => [
634
+ b(t.$slots, "optionAnnotator", P(E({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
635
+ ]),
636
+ key: "7"
637
+ } : void 0
638
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : p("", !0),
639
+ (s(), i("svg", {
640
+ ref_key: "svgRef",
641
+ ref: Te,
642
+ xmlns: u(Dt),
643
+ "aria-label": e.value.style.title.text || "candlestick chart",
644
+ class: L({ "vue-data-ui-fullscreen--on": W.value, "vue-data-ui-fulscreen--off": !W.value }),
645
+ viewBox: `0 0 ${d.value.width <= 0 ? 10 : d.value.width} ${d.value.height <= 0 ? 10 : d.value.height}`,
646
+ style: me(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
647
+ }, [
648
+ Ye(u(at)),
649
+ t.$slots["chart-background"] ? (s(), i("foreignObject", {
650
+ key: 0,
651
+ x: n.value.left,
652
+ y: n.value.top,
653
+ width: Math.max(0.1, n.value.width),
654
+ height: Math.max(0.1, n.value.height),
655
+ style: {
656
+ pointerEvents: "none"
657
+ }
658
+ }, [
659
+ b(t.$slots, "chart-background", {}, void 0, !0)
660
+ ], 8, rl)) : p("", !0),
661
+ k.value.length > 0 ? (s(), i("g", vl, [
662
+ c("defs", null, [
663
+ c("linearGradient", {
664
+ id: `bearish_gradient_${w.value}`,
665
+ x2: "0%",
666
+ y2: "100%"
667
+ }, [
668
+ c("stop", {
669
+ offset: "0%",
670
+ "stop-color": e.value.style.layout.candle.colors.bearish
671
+ }, null, 8, yl),
672
+ c("stop", {
673
+ offset: "50%",
674
+ "stop-color": `${u(ee)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
675
+ }, null, 8, cl),
676
+ c("stop", {
677
+ offset: "100%",
678
+ "stop-color": `${u(ee)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
679
+ }, null, 8, hl)
680
+ ], 8, dl),
681
+ c("linearGradient", {
682
+ id: `bullish_gradient_${w.value}`,
683
+ x2: "0%",
684
+ y2: "100%"
685
+ }, [
686
+ c("stop", {
687
+ offset: "0%",
688
+ "stop-color": e.value.style.layout.candle.colors.bullish
689
+ }, null, 8, gl),
690
+ c("stop", {
691
+ offset: "50%",
692
+ "stop-color": `${u(ee)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
693
+ }, null, 8, pl),
694
+ c("stop", {
695
+ offset: "100%",
696
+ "stop-color": `${u(ee)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
697
+ }, null, 8, bl)
698
+ ], 8, fl)
699
+ ]),
700
+ e.value.style.layout.grid.show ? (s(), i("g", ml, [
701
+ c("line", {
702
+ x1: n.value.left,
703
+ x2: n.value.left,
704
+ y1: n.value.top,
705
+ y2: n.value.bottom,
706
+ stroke: e.value.style.layout.grid.stroke,
707
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
708
+ "stroke-linecap": "round"
709
+ }, null, 8, xl),
710
+ c("line", {
711
+ x1: n.value.left,
712
+ x2: n.value.right,
713
+ y1: n.value.bottom,
714
+ y2: n.value.bottom,
715
+ stroke: e.value.style.layout.grid.stroke,
716
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
717
+ "stroke-linecap": "round"
718
+ }, null, 8, kl)
719
+ ])) : p("", !0),
720
+ e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), i("g", {
721
+ key: 1,
722
+ ref_key: "scaleLabels",
723
+ ref: ue
724
+ }, [
725
+ (s(!0), i(V, null, B(ct.value, (l, o) => (s(), i("g", null, [
726
+ l.value >= C.value.min && l.value <= C.value.max ? (s(), i("line", {
727
+ key: 0,
728
+ x1: n.value.left,
729
+ x2: n.value.left - 5,
730
+ y1: l.y,
731
+ y2: l.y,
732
+ stroke: e.value.style.layout.grid.stroke,
733
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
734
+ "stroke-linecap": "round"
735
+ }, null, 8, wl)) : p("", !0),
736
+ l.value >= C.value.min && l.value <= C.value.max ? (s(), i("text", {
737
+ key: 1,
738
+ x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
739
+ y: l.y + d.value.yAxisFontSize / 3,
740
+ "font-size": d.value.yAxisFontSize,
741
+ "text-anchor": "end",
742
+ fill: e.value.style.layout.grid.yAxis.dataLabels.color,
743
+ "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
744
+ }, Q(u(S)({
745
+ p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
746
+ v: l.value,
747
+ s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
748
+ r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
749
+ })), 9, Al)) : p("", !0)
750
+ ]))), 256))
751
+ ], 512)) : p("", !0),
752
+ e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
753
+ key: 2,
754
+ ref_key: "timeLabelsEls",
755
+ ref: H
756
+ }, [
757
+ (s(!0), i(V, null, B(ht.value, (l, o) => (s(), i("g", null, [
758
+ c("text", {
759
+ class: "vue-data-ui-time-label",
760
+ transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + d.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
761
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
762
+ "font-size": d.value.xAxisFontSize,
763
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
764
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
765
+ }, Q(l), 9, _l)
766
+ ]))), 256))
767
+ ], 512)) : p("", !0),
768
+ e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
769
+ key: 3,
770
+ ref_key: "timeLabelsEls",
771
+ ref: H
772
+ }, [
773
+ (s(!0), i(V, null, B(R.value, (l, o) => (s(), i("g", null, [
774
+ c("text", {
775
+ class: "vue-data-ui-time-label",
776
+ transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + d.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
777
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
778
+ "font-size": d.value.xAxisFontSize,
779
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
780
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
781
+ }, Q(l.text), 9, Cl)
782
+ ]))), 256))
783
+ ], 512)) : p("", !0),
784
+ c("g", null, [
785
+ (s(!0), i(V, null, B(k.value, (l, o) => (s(), i("g", null, [
786
+ c("rect", {
787
+ x: l.open.x - e.value.style.layout.wick.strokeWidth / 2,
788
+ y: l.high.y,
789
+ width: e.value.style.layout.wick.strokeWidth,
790
+ height: Math.abs(l.high.y - l.low.y),
791
+ fill: e.value.style.layout.wick.stroke,
792
+ stroke: "none",
793
+ rx: e.value.style.layout.wick.strokeWidth / 2,
794
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
795
+ }, null, 10, $l),
796
+ e.value.style.layout.wick.extremity.shape === "circle" ? (s(), i("g", zl, [
797
+ c("circle", {
798
+ cx: l.high.x,
799
+ cy: l.high.y,
800
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
801
+ fill: e.value.style.layout.wick.extremity.color,
802
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
803
+ }, null, 10, Ll),
804
+ c("circle", {
805
+ cx: l.low.x,
806
+ cy: l.low.y,
807
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
808
+ fill: e.value.style.layout.wick.extremity.color,
809
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
810
+ }, null, 10, Sl)
811
+ ])) : p("", !0),
812
+ e.value.style.layout.wick.extremity.shape === "line" ? (s(), i("g", Tl, [
813
+ c("rect", {
814
+ x: l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
815
+ y: l.high.y - e.value.style.layout.wick.strokeWidth / 2,
816
+ width: Math.abs(l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.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" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
817
+ height: e.value.style.layout.wick.strokeWidth,
818
+ rx: e.value.style.layout.wick.strokeWidth / 2,
819
+ fill: e.value.style.layout.wick.extremity.color,
820
+ stroke: "none",
821
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
822
+ }, null, 10, Il),
823
+ c("rect", {
824
+ x: l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
825
+ y: l.low.y - e.value.style.layout.wick.strokeWidth / 2,
826
+ width: Math.abs(l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.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" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
827
+ height: e.value.style.layout.wick.strokeWidth,
828
+ fill: e.value.style.layout.wick.extremity.color,
829
+ stroke: "none",
830
+ rx: e.value.style.layout.wick.strokeWidth / 2,
831
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
832
+ }, null, 10, Fl)
833
+ ])) : p("", !0)
834
+ ]))), 256))
835
+ ]),
836
+ c("g", null, [
837
+ (s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
838
+ x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
839
+ y: l.isBullish ? l.last.y : l.open.y,
840
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
841
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
842
+ fill: e.value.style.layout.candle.gradient.underlayer,
843
+ rx: e.value.style.layout.candle.borderRadius,
844
+ stroke: "none",
845
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
846
+ }, null, 10, Rl))), 256)),
847
+ (s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
848
+ x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
849
+ y: l.isBullish ? l.last.y : l.open.y,
850
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
851
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
852
+ fill: l.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${w.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${w.value})` : e.value.style.layout.candle.colors.bearish,
853
+ rx: e.value.style.layout.candle.borderRadius,
854
+ stroke: e.value.style.layout.candle.stroke,
855
+ "stroke-width": e.value.style.layout.candle.strokeWidth,
856
+ "stroke-linecap": "round",
857
+ "stroke-linejoin": "round",
858
+ class: L({ "vue-data-ui-transition": $.value && !u(z) })
859
+ }, null, 10, Ol))), 256))
860
+ ]),
861
+ c("g", null, [
862
+ (s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
863
+ x: n.value.left + o * v.value,
864
+ y: n.value.top,
865
+ height: n.value.height <= 0 ? 1e-4 : n.value.height,
866
+ width: v.value <= 0 ? 1e-4 : v.value,
867
+ fill: se.value === o ? u(Ht)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
868
+ onMouseover: () => pt(o, l),
869
+ onMouseleave: () => gt(o, l),
870
+ onClick: () => ft(o, l)
871
+ }, null, 40, Nl))), 256))
872
+ ])
873
+ ])) : p("", !0),
874
+ b(t.$slots, "svg", { svg: d.value }, void 0, !0)
875
+ ], 14, nl)),
876
+ t.$slots.watermark ? (s(), i("div", Pl, [
877
+ b(t.$slots, "watermark", P(E({ isPrinting: u(Fe) || u(Re) })), void 0, !0)
878
+ ])) : p("", !0),
879
+ e.value.style.zoom.show && te.value ? (s(), i("div", {
880
+ key: 5,
881
+ ref_key: "chartSlicer",
882
+ ref: Ae
883
+ }, [
884
+ (s(), N(ll, {
885
+ ref_key: "slicerComponent",
886
+ ref: Me,
887
+ key: `slicer_${j.value}`,
888
+ background: e.value.style.zoom.color,
889
+ borderColor: e.value.style.backgroundColor,
890
+ fontSize: e.value.style.zoom.fontSize,
891
+ useResetSlot: e.value.style.zoom.useResetSlot,
892
+ labelLeft: Be.value.start,
893
+ labelRight: Be.value.end,
894
+ textColor: e.value.style.color,
895
+ inputColor: e.value.style.zoom.color,
896
+ selectColor: e.value.style.zoom.highlightColor,
897
+ max: G.value,
898
+ min: 0,
899
+ valueStart: y.value.start,
900
+ valueEnd: y.value.end,
901
+ start: y.value.start,
902
+ "onUpdate:start": a[0] || (a[0] = (l) => y.value.start = l),
903
+ end: y.value.end,
904
+ "onUpdate:end": a[1] || (a[1] = (l) => y.value.end = l),
905
+ refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
906
+ refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : G.value,
907
+ enableRangeHandles: e.value.style.zoom.enableRangeHandles,
908
+ enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
909
+ onReset: bt
910
+ }, {
911
+ "reset-action": x(({ reset: l }) => [
912
+ b(t.$slots, "reset-action", P(E({ reset: l })), void 0, !0)
913
+ ]),
914
+ _: 3
915
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
916
+ ], 512)) : p("", !0),
917
+ c("div", {
918
+ ref_key: "chartLegend",
919
+ ref: we
920
+ }, [
921
+ b(t.$slots, "legend", { legend: k.value }, void 0, !0)
922
+ ], 512),
923
+ t.$slots.source ? (s(), i("div", {
924
+ key: 6,
925
+ ref_key: "source",
926
+ ref: _e,
927
+ dir: "auto"
928
+ }, [
929
+ b(t.$slots, "source", {}, void 0, !0)
930
+ ], 512)) : p("", !0),
931
+ Ye(u(st), {
932
+ show: _.value.showTooltip && ae.value,
933
+ backgroundColor: e.value.style.tooltip.backgroundColor,
934
+ color: e.value.style.tooltip.color,
935
+ borderRadius: e.value.style.tooltip.borderRadius,
936
+ borderColor: e.value.style.tooltip.borderColor,
937
+ borderWidth: e.value.style.tooltip.borderWidth,
938
+ fontSize: e.value.style.tooltip.fontSize,
939
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
940
+ position: e.value.style.tooltip.position,
941
+ offsetY: e.value.style.tooltip.offsetY,
942
+ parent: T.value,
943
+ content: oe.value,
944
+ isFullscreen: W.value,
945
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
946
+ smooth: e.value.style.tooltip.smooth,
947
+ backdropFilter: e.value.style.tooltip.backdropFilter
948
+ }, {
949
+ "tooltip-before": x(() => [
950
+ b(t.$slots, "tooltip-before", P(E({ ...ye.value })), void 0, !0)
951
+ ]),
952
+ "tooltip-after": x(() => [
953
+ b(t.$slots, "tooltip-after", P(E({ ...ye.value })), void 0, !0)
954
+ ]),
955
+ _: 3
956
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
957
+ te.value ? (s(), N(u(tt), {
958
+ key: 7,
959
+ hideDetails: "",
960
+ config: {
961
+ open: _.value.showTable,
962
+ maxHeight: 1e4,
963
+ body: {
964
+ backgroundColor: e.value.style.backgroundColor,
965
+ color: e.value.style.color
966
+ },
967
+ head: {
968
+ backgroundColor: e.value.style.backgroundColor,
969
+ color: e.value.style.color
970
+ }
971
+ }
972
+ }, {
973
+ content: x(() => [
974
+ (s(), N(u(lt), {
975
+ key: `table_${$e.value}`,
976
+ colNames: q.value.colNames,
977
+ head: q.value.head,
978
+ body: q.value.body,
979
+ config: q.value.config,
980
+ title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
981
+ onClose: a[2] || (a[2] = (l) => _.value.showTable = !1)
982
+ }, {
983
+ th: x(({ th: l }) => [
984
+ Et(Q(l), 1)
985
+ ]),
986
+ td: x(({ td: l }) => [
987
+ c("div", { innerHTML: l }, null, 8, El)
988
+ ]),
989
+ _: 1
990
+ }, 8, ["colNames", "head", "body", "config", "title"]))
991
+ ]),
992
+ _: 1
993
+ }, 8, ["config"])) : p("", !0),
994
+ u(z) ? (s(), N(el, { key: 8 })) : p("", !0)
995
+ ], 46, il));
996
+ }
997
+ }, ea = /* @__PURE__ */ ul(Vl, [["__scopeId", "data-v-38d694dc"]]);
998
+ export {
999
+ ea as default
1000
+ };