vue-data-ui 2.15.4 → 2.15.5

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 (90) hide show
  1. package/dist/{Arrow-BQEd_wRd.js → Arrow-CI_Chty0.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BjF36RRw.js → BaseDraggableDialog-UeaNekHG.js} +2 -2
  3. package/dist/{BaseIcon-2scCpKdr.js → BaseIcon-DTTmgKBX.js} +1 -1
  4. package/dist/{ColorPicker-CDeA3YBV.js → ColorPicker-BySm_2Gi.js} +6 -6
  5. package/dist/{DataTable-IKRxrKEU.js → DataTable-CLeYfh93.js} +2 -2
  6. package/dist/{Legend-DC-fDruC.js → Legend-B949nNP9.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-bX1Ui_EC.js → NonSvgPenAndPaper-zuNWbm52.js} +3 -3
  8. package/dist/{PackageVersion-CQFOMkQe.js → PackageVersion-Djh3oJFs.js} +1 -1
  9. package/dist/{PenAndPaper-DFjucqRK.js → PenAndPaper-BlF1d4XE.js} +3 -3
  10. package/dist/{Shape-FD7ONBrG.js → Shape-DmDw1mpi.js} +1 -1
  11. package/dist/{Slicer-Bzl5YpDL.js → Slicer-mINKiN6T.js} +13 -13
  12. package/dist/{SparkTooltip-BCvNYPb4.js → SparkTooltip-B888Ijov.js} +1 -1
  13. package/dist/{Title-CIt92-DI.js → Title-CPvPrwF4.js} +1 -1
  14. package/dist/{Tooltip-1FFfLKkv.js → Tooltip-BiWfcBQk.js} +1 -1
  15. package/dist/{UserOptions-ChEMQwwM.js → UserOptions-CFllUVQ4.js} +2 -2
  16. package/dist/{dom-to-png-DT4oXcWc.js → dom-to-png-DeajhH5Z.js} +1 -1
  17. package/dist/{img-DFfoLjtb.js → img-4TaH43jS.js} +1 -1
  18. package/dist/{index-k9FPl_-D.js → index-CBhz79Be.js} +11 -6
  19. package/dist/{pdf-CN1aIkJS.js → pdf-BlK5aBh-.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +7 -0
  22. package/dist/types/vue-data-ui.d.ts +7 -0
  23. package/dist/{useNestedProp-upzRxZOw.js → useNestedProp-Cg9K3ISG.js} +1 -1
  24. package/dist/{usePrinter-CARdq6Fz.js → usePrinter-DNC_9y1d.js} +2 -2
  25. package/dist/{vue-data-ui-mV-4-e8e.js → vue-data-ui-DcP8arpr.js} +63 -63
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-BMhc9SiP.js → vue-ui-3d-bar-k4SNfbLV.js} +5 -5
  28. package/dist/{vue-ui-accordion-ATCD6-Tg.js → vue-ui-accordion-BWiiOpGO.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-2i_hXqip.js → vue-ui-age-pyramid-ruNP1NJy.js} +5 -5
  30. package/dist/{vue-ui-annotator-Breve0su.js → vue-ui-annotator-_31h_MMe.js} +2 -2
  31. package/dist/{vue-ui-bullet-Biziff3B.js → vue-ui-bullet-BWmLA5Tg.js} +6 -6
  32. package/dist/vue-ui-candlestick-C8f9jUPZ.js +856 -0
  33. package/dist/{vue-ui-carousel-table-ZHZOptd2.js → vue-ui-carousel-table-DY90M9EE.js} +4 -4
  34. package/dist/{vue-ui-chestnut-Cg0P2bco.js → vue-ui-chestnut-DyxtZhwH.js} +28 -28
  35. package/dist/{vue-ui-chord-CODyOR1w.js → vue-ui-chord-C8hE1GXD.js} +47 -47
  36. package/dist/{vue-ui-circle-pack-BZ0Fl6Em.js → vue-ui-circle-pack-Dy8buEl5.js} +24 -24
  37. package/dist/{vue-ui-cursor-PLc3WrpA.js → vue-ui-cursor-Bb8yPXC9.js} +2 -2
  38. package/dist/{vue-ui-dashboard-BiGxJMVg.js → vue-ui-dashboard-SSYhdz1j.js} +62 -62
  39. package/dist/{vue-ui-digits-D_s5X6Gv.js → vue-ui-digits-D4Du84P3.js} +2 -2
  40. package/dist/{vue-ui-donut-BADbAnZ7.js → vue-ui-donut-C0dqyYUE.js} +7 -7
  41. package/dist/{vue-ui-donut-evolution-DSDySesn.js → vue-ui-donut-evolution-BOrRbvDz.js} +7 -7
  42. package/dist/{vue-ui-dumbbell-C-81iCzF.js → vue-ui-dumbbell-DKmEVC-5.js} +6 -6
  43. package/dist/{vue-ui-flow-MlOiiVqg.js → vue-ui-flow-DalrAEmv.js} +24 -24
  44. package/dist/{vue-ui-funnel-DXCWqpfj.js → vue-ui-funnel-B-k_4VgX.js} +5 -5
  45. package/dist/{vue-ui-galaxy-Aremt6Os.js → vue-ui-galaxy-BWaie_o-.js} +35 -35
  46. package/dist/{vue-ui-gauge-CRt_-O7S.js → vue-ui-gauge-D71TDx5z.js} +17 -17
  47. package/dist/{vue-ui-gizmo-2b7hFkMI.js → vue-ui-gizmo-CJChusop.js} +3 -3
  48. package/dist/{vue-ui-heatmap-DbLkBq8U.js → vue-ui-heatmap-DLwLB3pv.js} +31 -31
  49. package/dist/{vue-ui-history-plot-CJ7xDgWe.js → vue-ui-history-plot-D7wNqDSc.js} +34 -34
  50. package/dist/{vue-ui-kpi-BEUT--Y2.js → vue-ui-kpi-CJut0fnk.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-CFKVgefJ.js → vue-ui-mini-loader-DP2pINNZ.js} +2 -2
  52. package/dist/{vue-ui-molecule-BzPDfeL2.js → vue-ui-molecule-D8b1J-IM.js} +4 -4
  53. package/dist/{vue-ui-mood-radar-CxCOF6D7.js → vue-ui-mood-radar-Br6izAkp.js} +6 -6
  54. package/dist/{vue-ui-nested-donuts-7Y06IxwD.js → vue-ui-nested-donuts-DTYcStbt.js} +25 -25
  55. package/dist/{vue-ui-onion-C5ycZG0D.js → vue-ui-onion-DVtreg0e.js} +6 -6
  56. package/dist/{vue-ui-parallel-coordinate-plot-DTi16joz.js → vue-ui-parallel-coordinate-plot-COHHYnBG.js} +35 -35
  57. package/dist/{vue-ui-quadrant-CKhiKHS0.js → vue-ui-quadrant-ClO3Aae-.js} +7 -7
  58. package/dist/{vue-ui-quick-chart-CvwSCsif.js → vue-ui-quick-chart-DXRWvUUA.js} +5 -5
  59. package/dist/{vue-ui-radar-CVsEeYXD.js → vue-ui-radar-Cs54EIJ2.js} +6 -6
  60. package/dist/{vue-ui-rating-fxUUbMdu.js → vue-ui-rating-Drx2P4xK.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-BxpZWN-i.js → vue-ui-relation-circle-B75Rh82J.js} +30 -30
  62. package/dist/{vue-ui-ridgeline-CIB1O3j4.js → vue-ui-ridgeline-DuZjVwmL.js} +7 -7
  63. package/dist/{vue-ui-rings-BrNNe84c.js → vue-ui-rings-DWMToWPQ.js} +21 -21
  64. package/dist/{vue-ui-scatter-16nBWie7.js → vue-ui-scatter-CAh7kj6p.js} +7 -7
  65. package/dist/{vue-ui-skeleton-Bd_C0wSv.js → vue-ui-skeleton-Dnw_Mcqb.js} +3 -3
  66. package/dist/{vue-ui-smiley-DMeM0qiO.js → vue-ui-smiley-CkbdMJqH.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-BHFQFK9s.js → vue-ui-spark-trend-DYVXugEw.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-ll_sPgnw.js → vue-ui-sparkbar-Bv1RBHgo.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-CxJGBD5X.js → vue-ui-sparkgauge-Ls2_d0PB.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-D2G4enc2.js → vue-ui-sparkhistogram-CimMCtyI.js} +4 -4
  71. package/dist/{vue-ui-sparkline-BpPTlOzu.js → vue-ui-sparkline-ex9TddKP.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-Ceg1ZY7U.js → vue-ui-sparkstackbar-DUy1WJg0.js} +3 -3
  73. package/dist/{vue-ui-stackbar-CapcKmV8.js → vue-ui-stackbar-DaaB_FjD.js} +8 -8
  74. package/dist/{vue-ui-strip-plot-BNNnSAKO.js → vue-ui-strip-plot-HVQoc18O.js} +32 -32
  75. package/dist/{vue-ui-table-Cw9CBNiW.js → vue-ui-table-Oa_A-Vxo.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-CvnYKuy6.js → vue-ui-table-heatmap-DWdkbupf.js} +18 -18
  77. package/dist/{vue-ui-table-sparkline-DDGyDfI0.js → vue-ui-table-sparkline-Cxj3ZoBu.js} +4 -4
  78. package/dist/{vue-ui-thermometer-Bwj_Ew5C.js → vue-ui-thermometer-D-_Dqdcv.js} +5 -5
  79. package/dist/{vue-ui-timer-Do7bjdtG.js → vue-ui-timer-C01Ipde6.js} +30 -30
  80. package/dist/{vue-ui-tiremarks-wJyN3gsD.js → vue-ui-tiremarks-BTBo3bor.js} +5 -5
  81. package/dist/{vue-ui-treemap-CVSCG10W.js → vue-ui-treemap-DJEl32W1.js} +75 -75
  82. package/dist/{vue-ui-vertical-bar-CfRyQ9Cn.js → vue-ui-vertical-bar-CnCpCi4v.js} +8 -8
  83. package/dist/{vue-ui-waffle-CWDvXh87.js → vue-ui-waffle-rFSfHosn.js} +30 -30
  84. package/dist/{vue-ui-wheel-Dk5ONtqz.js → vue-ui-wheel-B6md6ra7.js} +5 -5
  85. package/dist/{vue-ui-word-cloud-BXoqw8VQ.js → vue-ui-word-cloud-Co6iFx9I.js} +5 -5
  86. package/dist/{vue-ui-world-rO4sQpvw.js → vue-ui-world-d09xOrf0.js} +5 -5
  87. package/dist/{vue-ui-xy-DTkzAeNr.js → vue-ui-xy-CuzhWfRK.js} +20 -20
  88. package/dist/{vue-ui-xy-canvas-Dmp9S9oY.js → vue-ui-xy-canvas-D2dyilFo.js} +45 -45
  89. package/package.json +1 -1
  90. package/dist/vue-ui-candlestick-5C8j-Fb6.js +0 -768
@@ -0,0 +1,856 @@
1
+ import { defineAsyncComponent as S, computed as f, ref as y, watch as Re, shallowRef as Oe, onMounted as ht, onBeforeUnmount as pt, nextTick as D, createElementBlock as u, openBlock as s, unref as r, normalizeStyle as ie, normalizeClass as Ne, createBlock as I, createCommentVNode as h, createElementVNode as v, createVNode as Pe, createSlots as ft, withCtx as x, renderSlot as g, normalizeProps as T, guardReactiveProps as L, Fragment as F, renderList as R, toDisplayString as q, createTextVNode as gt } from "vue";
2
+ import { u as xt, c as mt, a as bt, C as J, o as kt, e as O, D as wt, v as W, f as $, X as _t, w as K, s as Ct, E as Ve, q as $t, r as At, x as zt, y as St } from "./index-CBhz79Be.js";
3
+ import { t as It, u as Tt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Me } from "./useNestedProp-Cg9K3ISG.js";
5
+ import { u as Lt } from "./usePrinter-DNC_9y1d.js";
6
+ import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Rt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Ot from "./Title-CPvPrwF4.js";
9
+ import { S as Nt } from "./Slicer-mINKiN6T.js";
10
+ import { u as Pt } from "./useTimeLabels-Mrr0jrpL.js";
11
+ import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const Mt = ["id"], Et = ["xmlns", "viewBox"], Bt = ["x", "y", "width", "height"], Ut = { key: 1 }, Dt = ["id"], Wt = ["stop-color"], Gt = ["stop-color"], Ht = ["stop-color"], jt = ["id"], Xt = ["stop-color"], Yt = ["stop-color"], qt = ["stop-color"], Jt = { key: 0 }, Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Zt = { key: 1 }, el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tl = ["x", "y", "font-size", "fill", "font-weight"], ll = { key: 2 }, ol = ["transform", "text-anchor", "font-size", "fill", "font-weight"], al = { key: 3 }, sl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], il = { key: 0 }, nl = ["cx", "cy", "r", "fill"], rl = ["cx", "cy", "r", "fill"], dl = { key: 1 }, vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], yl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], cl = ["x", "y", "height", "width", "fill", "rx"], hl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], pl = ["x", "y", "height", "width", "fill", "onMouseover"], fl = {
13
+ key: 5,
14
+ class: "vue-data-ui-watermark"
15
+ }, gl = ["innerHTML"], xl = {
16
+ __name: "vue-ui-candlestick",
17
+ props: {
18
+ config: {
19
+ type: Object,
20
+ default() {
21
+ return {};
22
+ }
23
+ },
24
+ dataset: {
25
+ type: Array,
26
+ default() {
27
+ return [];
28
+ }
29
+ }
30
+ },
31
+ setup(Ee, { expose: Be }) {
32
+ const Ue = S(() => import("./vue-ui-accordion-BWiiOpGO.js")), De = S(() => import("./DataTable-CLeYfh93.js")), We = S(() => import("./PackageVersion-Djh3oJFs.js")), Ge = S(() => import("./PenAndPaper-BlF1d4XE.js")), He = S(() => import("./vue-ui-skeleton-Dnw_Mcqb.js")), je = S(() => import("./Tooltip-BiWfcBQk.js")), Xe = S(() => import("./UserOptions-CFllUVQ4.js")), { vue_ui_candlestick: Ye } = xt(), i = Ee, E = f(() => !!i.dataset && i.dataset.length), k = y(mt()), qe = y(null), Q = y(!1), Z = y(""), ee = y(void 0), ne = y(0), B = y(null), re = y(null), de = y(null), ve = y(null), ye = y(null), ce = y(null), G = y(0), he = y(0), pe = y(0), e = f({
33
+ get: () => me(),
34
+ set: (t) => t
35
+ }), { userOptionsVisible: te, setUserOptionsVisibility: fe, keepUserOptionState: ge } = Ft({ config: e.value }), { svgRef: xe } = Rt({ config: e.value.style.title });
36
+ function me() {
37
+ const t = Me({
38
+ userConfig: i.config,
39
+ defaultConfig: Ye
40
+ });
41
+ let o = {};
42
+ return t.theme ? o = {
43
+ ...Me({
44
+ userConfig: bt.vue_ui_candlestick[t.theme] || i.config,
45
+ defaultConfig: t
46
+ })
47
+ } : o = t, i.config && J(i.config, "style.zoom.startIndex") ? o.style.zoom.startIndex = i.config.style.zoom.startIndex : o.style.zoom.startIndex = null, i.config && J(i.config, "style.zoom.endIndex") ? o.style.zoom.endIndex = i.config.style.zoom.endIndex : o.style.zoom.endIndex = null, i.config && J(i.config, "style.layout.grid.yAxis.scale.min") ? o.style.layout.grid.yAxis.scale.min = i.config.style.layout.grid.yAxis.scale.min : o.style.layout.grid.yAxis.scale.min = null, i.config && J(i.config, "style.layout.grid.yAxis.scale.max") ? o.style.layout.grid.yAxis.scale.max = i.config.style.layout.grid.yAxis.scale.max : o.style.layout.grid.yAxis.scale.max = null, o;
48
+ }
49
+ Re(() => i.config, (t) => {
50
+ e.value = me(), te.value = !e.value.userOptions.showOnChartHover, be(), G.value += 1, pe.value += 1, he.value += 1, _.value.showTable = e.value.table.show, _.value.showTooltip = e.value.style.tooltip.show;
51
+ }, { deep: !0 }), Re(() => i.dataset, (t) => {
52
+ p.value.start = 0, p.value.end = t.length, G.value += 1;
53
+ }, { deep: !0 });
54
+ const c = y({
55
+ height: e.value.style.height,
56
+ width: e.value.style.width,
57
+ xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
58
+ yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
59
+ }), A = Oe(null), N = Oe(null);
60
+ ht(() => {
61
+ be();
62
+ });
63
+ function be() {
64
+ if (kt(i.dataset) && O({
65
+ componentName: "VueUiCandlestick",
66
+ type: "dataset"
67
+ }), e.value.responsive) {
68
+ const t = It(() => {
69
+ const { width: o, height: l } = Tt({
70
+ chart: B.value,
71
+ title: e.value.style.title.text ? re.value : null,
72
+ slicer: ve.value,
73
+ legend: de.value,
74
+ source: ye.value,
75
+ noTitle: ce.value
76
+ });
77
+ requestAnimationFrame(() => {
78
+ c.value.width = o, c.value.height = l, e.value.responsiveProportionalSizing ? (c.value.xAxisFontSize = Ve({
79
+ relator: Math.min(o, l),
80
+ adjuster: e.value.style.width,
81
+ source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
82
+ threshold: 6,
83
+ fallback: 6
84
+ }), c.value.yAxisFontSize = Ve({
85
+ relator: Math.min(o, l),
86
+ adjuster: e.value.style.width,
87
+ source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
88
+ threshold: 6,
89
+ fallback: 6
90
+ })) : (c.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, c.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize);
91
+ });
92
+ });
93
+ A.value && (N.value && A.value.unobserve(N.value), A.value.disconnect()), A.value = new ResizeObserver(t), N.value = B.value.parentNode, A.value.observe(N.value);
94
+ }
95
+ Se();
96
+ }
97
+ pt(() => {
98
+ A.value && (N.value && A.value.unobserve(N.value), A.value.disconnect());
99
+ });
100
+ const { isPrinting: ke, isImaging: we, generatePdf: _e, generateImage: Ce } = Lt({
101
+ elementId: `vue-ui-candlestick_${k.value}`,
102
+ fileName: e.value.style.title.text || "vue-ui-candlestick",
103
+ options: e.value.userOptions.print
104
+ }), Je = f(() => e.value.userOptions.show && !e.value.style.title.text), _ = y({
105
+ showTable: e.value.table.show,
106
+ showTooltip: e.value.style.tooltip.show
107
+ }), n = f(() => {
108
+ const { top: t, right: o, bottom: l, left: a } = e.value.style.layout.padding;
109
+ return {
110
+ top: t,
111
+ right: c.value.width - o,
112
+ left: a,
113
+ bottom: c.value.height - l,
114
+ width: c.value.width - a - o,
115
+ height: c.value.height - t - l
116
+ };
117
+ }), U = f(() => i.dataset.length), p = y({
118
+ start: 0,
119
+ end: U.value
120
+ }), $e = f(() => i.dataset.map((t, o) => ({
121
+ ...t,
122
+ absoluteIndex: o
123
+ })).slice(p.value.start, p.value.end)), le = f(() => (i.dataset.forEach((t, o) => {
124
+ [null, void 0].includes(t[0]) && O({
125
+ componentName: "VueUiCandlestick",
126
+ type: "datasetAttribute",
127
+ property: "period (index 0)",
128
+ index: o
129
+ }), [null, void 0].includes(t[1]) && O({
130
+ componentName: "VueUiCandlestick",
131
+ type: "datasetAttribute",
132
+ property: "open (index 1)",
133
+ index: o
134
+ }), [null, void 0].includes(t[2]) && O({
135
+ componentName: "VueUiCandlestick",
136
+ type: "datasetAttribute",
137
+ property: "high (index 2)",
138
+ index: o
139
+ }), [null, void 0].includes(t[3]) && O({
140
+ componentName: "VueUiCandlestick",
141
+ type: "datasetAttribute",
142
+ property: "low (index 3)",
143
+ index: o
144
+ }), [null, void 0].includes(t[4]) && O({
145
+ componentName: "VueUiCandlestick",
146
+ type: "datasetAttribute",
147
+ property: "last (index 4)",
148
+ index: o
149
+ }), [null, void 0].includes(t[5]) && O({
150
+ componentName: "VueUiCandlestick",
151
+ type: "datasetAttribute",
152
+ property: "volume (index 5)",
153
+ index: o
154
+ });
155
+ }), $e.value.map((t) => ({
156
+ absoluteIndex: t.absoluteIndex,
157
+ period: t[0],
158
+ open: t[1],
159
+ high: t[2],
160
+ low: t[3],
161
+ last: t[4],
162
+ volume: t[5]
163
+ })))), d = f(() => n.value.width / $e.value.length), Ae = f(() => {
164
+ const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...le.value.map((l) => l.high)) : e.value.style.layout.grid.yAxis.scale.max, o = e.value.style.layout.grid.yAxis.scale.min === null ? 0 : e.value.style.layout.grid.yAxis.scale.min;
165
+ return {
166
+ max: t,
167
+ min: o
168
+ };
169
+ }), w = f(() => wt(Ae.value.min, Ae.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
170
+ function H(t, o) {
171
+ return {
172
+ ...t,
173
+ x: W(n.value.left + o * d.value + d.value / 2),
174
+ y: W(n.value.top + (1 - (t - w.value.min) / (w.value.max - w.value.min)) * n.value.height),
175
+ value: W(t)
176
+ };
177
+ }
178
+ const m = f(() => le.value.map((t, o) => {
179
+ const l = H(t.open, o), a = H(t.high, o), C = H(t.low, o), b = H(t.last, o), z = t.last > t.open;
180
+ return {
181
+ period: t.period,
182
+ open: l,
183
+ high: a,
184
+ low: C,
185
+ last: b,
186
+ volume: t.volume,
187
+ isBullish: z,
188
+ absoluteIndex: t.absoluteIndex
189
+ };
190
+ }));
191
+ function Ke(t) {
192
+ return W((t - w.value.min) / (w.value.max - w.value.min));
193
+ }
194
+ const Qe = f(() => w.value.ticks.map((t) => ({
195
+ y: n.value.bottom - n.value.height * Ke(t),
196
+ value: W(t)
197
+ }))), Ze = f(() => le.value.map((t) => t.period)), P = f(() => Pt({
198
+ values: i.dataset.map((t) => t[0]),
199
+ maxDatapoints: i.dataset.length,
200
+ formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
201
+ start: p.value.start,
202
+ end: p.value.end
203
+ })), ze = f(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
204
+ start: P.value.find((t) => t.absoluteIndex === p.value.start).text,
205
+ end: P.value.find((t) => t.absoluteIndex === p.value.end - 1).text
206
+ } : {
207
+ start: i.dataset[p.value.start] ? i.dataset[p.value.start][0] : i.dataset[0][0],
208
+ end: i.dataset[p.value.end - 1] ? i.dataset[p.value.end - 1][0] : i.dataset.at(-1)[0]
209
+ }), oe = y(null);
210
+ function et(t, o) {
211
+ ee.value = t, oe.value = {
212
+ datapoint: o,
213
+ seriesIndex: t,
214
+ series: m.value,
215
+ config: e.value
216
+ };
217
+ const l = e.value.style.tooltip.customFormat;
218
+ if (zt(l) && St(() => l({
219
+ seriesIndex: t,
220
+ datapoint: o,
221
+ series: m.value,
222
+ config: e.value
223
+ })))
224
+ Z.value = l({
225
+ seriesIndex: t,
226
+ datapoint: o,
227
+ series: m.value,
228
+ config: e.value
229
+ });
230
+ else if (e.value.style.tooltip.show) {
231
+ let a = "";
232
+ const { period: C, open: b, high: z, low: se, last: ue, volume: Y, isBullish: Fe } = m.value[t], { period: ml, open: at, high: st, low: ut, last: it, volume: nt } = e.value.translations, rt = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value[t].text : C;
233
+ a += `<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}"
234
+ fill="${e.value.style.layout.candle.gradient.show ? Fe ? `url(#bullish_gradient_${k.value})` : `url(#bearish_gradient_${k.value})` : Fe ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${rt}</div>`, a += `${nt} : <b>${isNaN(Y) ? "-" : Number(Y.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, a += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`;
235
+ const dt = $({
236
+ p: e.value.style.tooltip.prefix,
237
+ v: b.value,
238
+ s: e.value.style.tooltip.suffix,
239
+ r: e.value.style.tooltip.roundingValue
240
+ });
241
+ a += `<div>${at}: <b>${dt}</b></div>`;
242
+ const vt = $({
243
+ p: e.value.style.tooltip.prefix,
244
+ v: z.value,
245
+ s: e.value.style.tooltip.suffix,
246
+ r: e.value.style.tooltip.roundingValue
247
+ });
248
+ a += `<div>${st}: <b>${vt}</b></div>`;
249
+ const yt = $({
250
+ p: e.value.style.tooltip.prefix,
251
+ v: se.value,
252
+ s: e.value.style.tooltip.suffix,
253
+ r: e.value.style.tooltip.roundingValue
254
+ });
255
+ a += `<div>${ut}: <b>${yt}</b></div>`;
256
+ const ct = $({
257
+ p: e.value.style.tooltip.prefix,
258
+ v: ue.value,
259
+ s: e.value.style.tooltip.suffix,
260
+ r: e.value.style.tooltip.roundingValue
261
+ });
262
+ a += `<div>${it}: <b>${ct}</b></div>`, a += "</div>", Z.value = `<div style="text-align:right">${a}</div>`;
263
+ }
264
+ Q.value = !0;
265
+ }
266
+ function tt() {
267
+ Se();
268
+ }
269
+ const V = y(null);
270
+ async function Se() {
271
+ (e.value.style.zoom.startIndex !== null || e.value.style.zoom.endIndex !== null) && V.value ? (e.value.style.zoom.startIndex !== null && (await D(), await D(), V.value && V.value.setStartValue(e.value.style.zoom.startIndex)), e.value.style.zoom.endIndex !== null && (await D(), await D(), V.value && V.value.setEndValue(lt(e.value.style.zoom.endIndex + 1)))) : (p.value = {
272
+ start: 0,
273
+ end: U.value
274
+ }, G.value += 1);
275
+ }
276
+ function lt(t) {
277
+ const o = U.value;
278
+ return t > o ? o : 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;
279
+ }
280
+ function Ie(t = null) {
281
+ D(() => {
282
+ const o = [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 = m.value.map((b, z) => [
283
+ e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value[z].text : b.period,
284
+ b.open.value,
285
+ b.high.value,
286
+ b.low.value,
287
+ b.last.value,
288
+ b.volume
289
+ ]), a = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([o]).concat(l), C = $t(a);
290
+ t ? t(C) : At({ csvContent: C, title: e.value.style.title.text || "vue-ui-candlestick" });
291
+ });
292
+ }
293
+ const j = f(() => {
294
+ const t = m.value.map((a, C) => {
295
+ const b = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value[C].text : a.period, z = $({
296
+ p: e.value.table.td.prefix,
297
+ v: a.open.value,
298
+ s: e.value.table.td.suffix,
299
+ r: e.value.table.td.roundingValue
300
+ }), se = $({
301
+ p: e.value.table.td.prefix,
302
+ v: a.high.value,
303
+ s: e.value.table.td.suffix,
304
+ r: e.value.table.td.roundingValue
305
+ }), ue = $({
306
+ p: e.value.table.td.prefix,
307
+ v: a.low.value,
308
+ s: e.value.table.td.suffix,
309
+ r: e.value.table.td.roundingValue
310
+ }), Y = $({
311
+ p: e.value.table.td.prefix,
312
+ v: a.last.value,
313
+ s: e.value.table.td.suffix,
314
+ r: e.value.table.td.roundingValue
315
+ });
316
+ return [
317
+ `<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 ? a.isBullish ? `url(#bullish_gradient_${k.value}` : `url(#bearish_gradient_${k.value})` : a.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${b}`,
318
+ z,
319
+ se,
320
+ ue,
321
+ Y,
322
+ `${isNaN(a.volume) ? "-" : a.volume.toLocaleString()}`
323
+ ];
324
+ }), o = {
325
+ th: {
326
+ backgroundColor: e.value.table.th.backgroundColor,
327
+ color: e.value.table.th.color,
328
+ outline: e.value.table.th.outline
329
+ },
330
+ td: {
331
+ backgroundColor: e.value.table.td.backgroundColor,
332
+ color: e.value.table.td.color,
333
+ outline: e.value.table.td.outline
334
+ },
335
+ breakpoint: e.value.table.responsiveBreakpoint
336
+ }, l = [
337
+ e.value.translations.period,
338
+ e.value.translations.open,
339
+ e.value.translations.high,
340
+ e.value.translations.low,
341
+ e.value.translations.last,
342
+ e.value.translations.volume
343
+ ];
344
+ return { head: l, body: t, config: o, colNames: l };
345
+ }), M = y(!1);
346
+ function ot(t) {
347
+ M.value = t, ne.value += 1;
348
+ }
349
+ function Te() {
350
+ _.value.showTable = !_.value.showTable;
351
+ }
352
+ function Le() {
353
+ _.value.showTooltip = !_.value.showTooltip;
354
+ }
355
+ const X = y(!1);
356
+ function ae() {
357
+ X.value = !X.value;
358
+ }
359
+ return Be({
360
+ generatePdf: _e,
361
+ generateCsv: Ie,
362
+ generateImage: Ce,
363
+ toggleTable: Te,
364
+ toggleTooltip: Le,
365
+ toggleAnnotator: ae
366
+ }), (t, o) => (s(), u("div", {
367
+ ref_key: "candlestickChart",
368
+ ref: B,
369
+ class: Ne(`vue-ui-candlestick ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
370
+ style: ie(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
371
+ id: `vue-ui-candlestick_${k.value}`,
372
+ onMouseenter: o[4] || (o[4] = () => r(fe)(!0)),
373
+ onMouseleave: o[5] || (o[5] = () => r(fe)(!1))
374
+ }, [
375
+ e.value.userOptions.buttons.annotator ? (s(), I(r(Ge), {
376
+ key: 0,
377
+ svgRef: r(xe),
378
+ backgroundColor: e.value.style.backgroundColor,
379
+ color: e.value.style.color,
380
+ active: X.value,
381
+ onClose: ae
382
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
383
+ Je.value ? (s(), u("div", {
384
+ key: 1,
385
+ ref_key: "noTitle",
386
+ ref: ce,
387
+ class: "vue-data-ui-no-title-space",
388
+ style: "height:36px; width: 100%;background:transparent"
389
+ }, null, 512)) : h("", !0),
390
+ e.value.style.title.text ? (s(), u("div", {
391
+ key: 2,
392
+ ref_key: "chartTitle",
393
+ ref: re,
394
+ style: "width:100%;background:transparent"
395
+ }, [
396
+ (s(), I(Ot, {
397
+ key: `title_${pe.value}`,
398
+ config: {
399
+ title: {
400
+ cy: "candlestick-div-title",
401
+ ...e.value.style.title
402
+ },
403
+ subtitle: {
404
+ cy: "candlestick-div-subtitle",
405
+ ...e.value.style.title.subtitle
406
+ }
407
+ }
408
+ }, null, 8, ["config"]))
409
+ ], 512)) : h("", !0),
410
+ e.value.userOptions.show && E.value && (r(ge) || r(te)) ? (s(), I(r(Xe), {
411
+ ref_key: "details",
412
+ ref: qe,
413
+ key: `user_options_${ne.value}`,
414
+ backgroundColor: e.value.style.backgroundColor,
415
+ color: e.value.style.color,
416
+ isImaging: r(we),
417
+ isPrinting: r(ke),
418
+ uid: k.value,
419
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
420
+ hasPdf: e.value.userOptions.buttons.pdf,
421
+ hasImg: e.value.userOptions.buttons.img,
422
+ hasXls: e.value.userOptions.buttons.csv,
423
+ hasTable: e.value.userOptions.buttons.table,
424
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
425
+ isFullscreen: M.value,
426
+ isTooltip: _.value.showTooltip,
427
+ titles: { ...e.value.userOptions.buttonTitles },
428
+ chartElement: B.value,
429
+ position: e.value.userOptions.position,
430
+ hasAnnotator: e.value.userOptions.buttons.annotator,
431
+ isAnnotation: X.value,
432
+ callbacks: e.value.userOptions.callbacks,
433
+ onToggleFullscreen: ot,
434
+ onGeneratePdf: r(_e),
435
+ onGenerateCsv: Ie,
436
+ onGenerateImage: r(Ce),
437
+ onToggleTable: Te,
438
+ onToggleTooltip: Le,
439
+ onToggleAnnotator: ae,
440
+ style: ie({
441
+ visibility: r(ge) ? r(te) ? "visible" : "hidden" : "visible"
442
+ })
443
+ }, ft({ _: 2 }, [
444
+ t.$slots.menuIcon ? {
445
+ name: "menuIcon",
446
+ fn: x(({ isOpen: l, color: a }) => [
447
+ g(t.$slots, "menuIcon", T(L({ isOpen: l, color: a })), void 0, !0)
448
+ ]),
449
+ key: "0"
450
+ } : void 0,
451
+ t.$slots.optionTooltip ? {
452
+ name: "optionTooltip",
453
+ fn: x(() => [
454
+ g(t.$slots, "optionTooltip", {}, void 0, !0)
455
+ ]),
456
+ key: "1"
457
+ } : void 0,
458
+ t.$slots.optionPdf ? {
459
+ name: "optionPdf",
460
+ fn: x(() => [
461
+ g(t.$slots, "optionPdf", {}, void 0, !0)
462
+ ]),
463
+ key: "2"
464
+ } : void 0,
465
+ t.$slots.optionCsv ? {
466
+ name: "optionCsv",
467
+ fn: x(() => [
468
+ g(t.$slots, "optionCsv", {}, void 0, !0)
469
+ ]),
470
+ key: "3"
471
+ } : void 0,
472
+ t.$slots.optionImg ? {
473
+ name: "optionImg",
474
+ fn: x(() => [
475
+ g(t.$slots, "optionImg", {}, void 0, !0)
476
+ ]),
477
+ key: "4"
478
+ } : void 0,
479
+ t.$slots.optionTable ? {
480
+ name: "optionTable",
481
+ fn: x(() => [
482
+ g(t.$slots, "optionTable", {}, void 0, !0)
483
+ ]),
484
+ key: "5"
485
+ } : void 0,
486
+ t.$slots.optionFullscreen ? {
487
+ name: "optionFullscreen",
488
+ fn: x(({ toggleFullscreen: l, isFullscreen: a }) => [
489
+ g(t.$slots, "optionFullscreen", T(L({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
490
+ ]),
491
+ key: "6"
492
+ } : void 0,
493
+ t.$slots.optionAnnotator ? {
494
+ name: "optionAnnotator",
495
+ fn: x(({ toggleAnnotator: l, isAnnotator: a }) => [
496
+ g(t.$slots, "optionAnnotator", T(L({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
497
+ ]),
498
+ key: "7"
499
+ } : void 0
500
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
501
+ E.value ? (s(), u("svg", {
502
+ key: 4,
503
+ ref_key: "svgRef",
504
+ ref: xe,
505
+ xmlns: r(_t),
506
+ class: Ne({ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }),
507
+ viewBox: `0 0 ${c.value.width <= 0 ? 10 : c.value.width} ${c.value.height <= 0 ? 10 : c.value.height}`,
508
+ style: ie(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
509
+ }, [
510
+ Pe(r(We)),
511
+ t.$slots["chart-background"] ? (s(), u("foreignObject", {
512
+ key: 0,
513
+ x: n.value.left,
514
+ y: n.value.top,
515
+ width: Math.max(0.1, n.value.width),
516
+ height: Math.max(0.1, n.value.height),
517
+ style: {
518
+ pointerEvents: "none"
519
+ }
520
+ }, [
521
+ g(t.$slots, "chart-background", {}, void 0, !0)
522
+ ], 8, Bt)) : h("", !0),
523
+ m.value.length > 0 ? (s(), u("g", Ut, [
524
+ v("defs", null, [
525
+ v("linearGradient", {
526
+ id: `bearish_gradient_${k.value}`,
527
+ x2: "0%",
528
+ y2: "100%"
529
+ }, [
530
+ v("stop", {
531
+ offset: "0%",
532
+ "stop-color": e.value.style.layout.candle.colors.bearish
533
+ }, null, 8, Wt),
534
+ v("stop", {
535
+ offset: "50%",
536
+ "stop-color": `${r(K)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
537
+ }, null, 8, Gt),
538
+ v("stop", {
539
+ offset: "100%",
540
+ "stop-color": `${r(K)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
541
+ }, null, 8, Ht)
542
+ ], 8, Dt),
543
+ v("linearGradient", {
544
+ id: `bullish_gradient_${k.value}`,
545
+ x2: "0%",
546
+ y2: "100%"
547
+ }, [
548
+ v("stop", {
549
+ offset: "0%",
550
+ "stop-color": e.value.style.layout.candle.colors.bullish
551
+ }, null, 8, Xt),
552
+ v("stop", {
553
+ offset: "50%",
554
+ "stop-color": `${r(K)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
555
+ }, null, 8, Yt),
556
+ v("stop", {
557
+ offset: "100%",
558
+ "stop-color": `${r(K)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
559
+ }, null, 8, qt)
560
+ ], 8, jt)
561
+ ]),
562
+ e.value.style.layout.grid.show ? (s(), u("g", Jt, [
563
+ v("line", {
564
+ x1: n.value.left,
565
+ x2: n.value.left,
566
+ y1: n.value.top,
567
+ y2: n.value.bottom,
568
+ stroke: e.value.style.layout.grid.stroke,
569
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
570
+ "stroke-linecap": "round"
571
+ }, null, 8, Kt),
572
+ v("line", {
573
+ x1: n.value.left,
574
+ x2: n.value.right,
575
+ y1: n.value.bottom,
576
+ y2: n.value.bottom,
577
+ stroke: e.value.style.layout.grid.stroke,
578
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
579
+ "stroke-linecap": "round"
580
+ }, null, 8, Qt)
581
+ ])) : h("", !0),
582
+ e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g", Zt, [
583
+ (s(!0), u(F, null, R(Qe.value, (l, a) => (s(), u("g", null, [
584
+ l.value >= w.value.min && l.value <= w.value.max ? (s(), u("line", {
585
+ key: 0,
586
+ x1: n.value.left,
587
+ x2: n.value.left - 5,
588
+ y1: l.y,
589
+ y2: l.y,
590
+ stroke: e.value.style.layout.grid.stroke,
591
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
592
+ "stroke-linecap": "round"
593
+ }, null, 8, el)) : h("", !0),
594
+ l.value >= w.value.min && l.value <= w.value.max ? (s(), u("text", {
595
+ key: 1,
596
+ x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
597
+ y: l.y + c.value.yAxisFontSize / 3,
598
+ "font-size": c.value.yAxisFontSize,
599
+ "text-anchor": "end",
600
+ fill: e.value.style.layout.grid.yAxis.dataLabels.color,
601
+ "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
602
+ }, q(r($)({
603
+ p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
604
+ v: l.value,
605
+ s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
606
+ r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
607
+ })), 9, tl)) : h("", !0)
608
+ ]))), 256))
609
+ ])) : h("", !0),
610
+ e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", ll, [
611
+ (s(!0), u(F, null, R(Ze.value, (l, a) => (s(), u("g", null, [
612
+ v("text", {
613
+ transform: `translate(${n.value.left + d.value * a + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
614
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
615
+ "font-size": c.value.xAxisFontSize,
616
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
617
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
618
+ }, q(l), 9, ol)
619
+ ]))), 256))
620
+ ])) : h("", !0),
621
+ e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", al, [
622
+ (s(!0), u(F, null, R(P.value, (l, a) => (s(), u("g", null, [
623
+ v("text", {
624
+ transform: `translate(${n.value.left + d.value * a + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
625
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
626
+ "font-size": c.value.xAxisFontSize,
627
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
628
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
629
+ }, q(l.text), 9, sl)
630
+ ]))), 256))
631
+ ])) : h("", !0),
632
+ v("g", null, [
633
+ (s(!0), u(F, null, R(m.value, (l, a) => (s(), u("g", null, [
634
+ v("line", {
635
+ x1: l.open.x,
636
+ x2: l.open.x,
637
+ y1: l.high.y,
638
+ y2: l.low.y,
639
+ stroke: e.value.style.layout.wick.stroke,
640
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
641
+ "stroke-linecap": "round"
642
+ }, null, 8, ul),
643
+ e.value.style.layout.wick.extremity.shape === "circle" ? (s(), u("g", il, [
644
+ v("circle", {
645
+ cx: l.high.x,
646
+ cy: l.high.y,
647
+ r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
648
+ fill: e.value.style.layout.wick.extremity.color
649
+ }, null, 8, nl),
650
+ v("circle", {
651
+ cx: l.low.x,
652
+ cy: l.low.y,
653
+ r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
654
+ fill: e.value.style.layout.wick.extremity.color
655
+ }, null, 8, rl)
656
+ ])) : h("", !0),
657
+ e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g", dl, [
658
+ v("line", {
659
+ x1: 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,
660
+ x2: 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,
661
+ y1: l.high.y,
662
+ y2: l.high.y,
663
+ stroke: e.value.style.layout.wick.extremity.color,
664
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
665
+ "stroke-linecap": "round"
666
+ }, null, 8, vl),
667
+ v("line", {
668
+ x1: 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,
669
+ x2: 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,
670
+ y1: l.low.y,
671
+ y2: l.low.y,
672
+ stroke: e.value.style.layout.wick.extremity.color,
673
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
674
+ "stroke-linecap": "round"
675
+ }, null, 8, yl)
676
+ ])) : h("", !0)
677
+ ]))), 256))
678
+ ]),
679
+ v("g", null, [
680
+ (s(!0), u(F, null, R(m.value, (l, a) => (s(), u("rect", {
681
+ x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
682
+ y: l.isBullish ? l.last.y : l.open.y,
683
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
684
+ width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
685
+ fill: e.value.style.layout.candle.gradient.underlayer,
686
+ rx: e.value.style.layout.candle.borderRadius,
687
+ stroke: "none"
688
+ }, null, 8, cl))), 256)),
689
+ (s(!0), u(F, null, R(m.value, (l, a) => (s(), u("rect", {
690
+ x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
691
+ y: l.isBullish ? l.last.y : l.open.y,
692
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
693
+ width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
694
+ fill: l.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${k.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${k.value})` : e.value.style.layout.candle.colors.bearish,
695
+ rx: e.value.style.layout.candle.borderRadius,
696
+ stroke: e.value.style.layout.candle.stroke,
697
+ "stroke-width": e.value.style.layout.candle.strokeWidth,
698
+ "stroke-linecap": "round",
699
+ "stroke-linejoin": "round"
700
+ }, null, 8, hl))), 256))
701
+ ]),
702
+ v("g", null, [
703
+ (s(!0), u(F, null, R(m.value, (l, a) => (s(), u("rect", {
704
+ x: n.value.left + a * d.value,
705
+ y: n.value.top,
706
+ height: n.value.height <= 0 ? 1e-4 : n.value.height,
707
+ width: d.value <= 0 ? 1e-4 : d.value,
708
+ fill: ee.value === a ? r(Ct)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
709
+ onMouseover: (C) => et(a, l),
710
+ onMouseleave: o[0] || (o[0] = (C) => {
711
+ ee.value = void 0, Q.value = !1;
712
+ })
713
+ }, null, 40, pl))), 256))
714
+ ])
715
+ ])) : h("", !0),
716
+ g(t.$slots, "svg", { svg: c.value }, void 0, !0)
717
+ ], 14, Et)) : h("", !0),
718
+ t.$slots.watermark ? (s(), u("div", fl, [
719
+ g(t.$slots, "watermark", T(L({ isPrinting: r(ke) || r(we) })), void 0, !0)
720
+ ])) : h("", !0),
721
+ E.value ? h("", !0) : (s(), I(r(He), {
722
+ key: 6,
723
+ config: {
724
+ type: "candlesticks",
725
+ style: {
726
+ backgroundColor: e.value.style.backgroundColor,
727
+ candlesticks: {
728
+ axis: {
729
+ color: "#CCCCCC"
730
+ },
731
+ candle: {
732
+ color: "#CCCCCC"
733
+ }
734
+ }
735
+ }
736
+ }
737
+ }, null, 8, ["config"])),
738
+ e.value.style.zoom.show && E.value ? (s(), u("div", {
739
+ key: 7,
740
+ ref_key: "chartSlicer",
741
+ ref: ve
742
+ }, [
743
+ (s(), I(Nt, {
744
+ ref_key: "slicerComponent",
745
+ ref: V,
746
+ key: `slicer_${G.value}`,
747
+ background: e.value.style.zoom.color,
748
+ borderColor: e.value.style.backgroundColor,
749
+ fontSize: e.value.style.zoom.fontSize,
750
+ useResetSlot: e.value.style.zoom.useResetSlot,
751
+ labelLeft: ze.value.start,
752
+ labelRight: ze.value.end,
753
+ textColor: e.value.style.color,
754
+ inputColor: e.value.style.zoom.color,
755
+ selectColor: e.value.style.zoom.highlightColor,
756
+ max: U.value,
757
+ min: 0,
758
+ valueStart: p.value.start,
759
+ valueEnd: p.value.end,
760
+ start: p.value.start,
761
+ "onUpdate:start": o[1] || (o[1] = (l) => p.value.start = l),
762
+ end: p.value.end,
763
+ "onUpdate:end": o[2] || (o[2] = (l) => p.value.end = l),
764
+ refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
765
+ refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : U.value,
766
+ enableRangeHandles: e.value.style.zoom.enableRangeHandles,
767
+ enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
768
+ onReset: tt
769
+ }, {
770
+ "reset-action": x(({ reset: l }) => [
771
+ g(t.$slots, "reset-action", T(L({ reset: l })), void 0, !0)
772
+ ]),
773
+ _: 3
774
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
775
+ ], 512)) : h("", !0),
776
+ v("div", {
777
+ ref_key: "chartLegend",
778
+ ref: de
779
+ }, [
780
+ g(t.$slots, "legend", { legend: m.value }, void 0, !0)
781
+ ], 512),
782
+ t.$slots.source ? (s(), u("div", {
783
+ key: 8,
784
+ ref_key: "source",
785
+ ref: ye,
786
+ dir: "auto"
787
+ }, [
788
+ g(t.$slots, "source", {}, void 0, !0)
789
+ ], 512)) : h("", !0),
790
+ Pe(r(je), {
791
+ show: _.value.showTooltip && Q.value,
792
+ backgroundColor: e.value.style.tooltip.backgroundColor,
793
+ color: e.value.style.tooltip.color,
794
+ borderRadius: e.value.style.tooltip.borderRadius,
795
+ borderColor: e.value.style.tooltip.borderColor,
796
+ borderWidth: e.value.style.tooltip.borderWidth,
797
+ fontSize: e.value.style.tooltip.fontSize,
798
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
799
+ position: e.value.style.tooltip.position,
800
+ offsetY: e.value.style.tooltip.offsetY,
801
+ parent: B.value,
802
+ content: Z.value,
803
+ isFullscreen: M.value,
804
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
805
+ }, {
806
+ "tooltip-before": x(() => [
807
+ g(t.$slots, "tooltip-before", T(L({ ...oe.value })), void 0, !0)
808
+ ]),
809
+ "tooltip-after": x(() => [
810
+ g(t.$slots, "tooltip-after", T(L({ ...oe.value })), void 0, !0)
811
+ ]),
812
+ _: 3
813
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
814
+ E.value ? (s(), I(r(Ue), {
815
+ key: 9,
816
+ hideDetails: "",
817
+ config: {
818
+ open: _.value.showTable,
819
+ maxHeight: 1e4,
820
+ body: {
821
+ backgroundColor: e.value.style.backgroundColor,
822
+ color: e.value.style.color
823
+ },
824
+ head: {
825
+ backgroundColor: e.value.style.backgroundColor,
826
+ color: e.value.style.color
827
+ }
828
+ }
829
+ }, {
830
+ content: x(() => [
831
+ (s(), I(r(De), {
832
+ key: `table_${he.value}`,
833
+ colNames: j.value.colNames,
834
+ head: j.value.head,
835
+ body: j.value.body,
836
+ config: j.value.config,
837
+ title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
838
+ onClose: o[3] || (o[3] = (l) => _.value.showTable = !1)
839
+ }, {
840
+ th: x(({ th: l }) => [
841
+ gt(q(l), 1)
842
+ ]),
843
+ td: x(({ td: l }) => [
844
+ v("div", { innerHTML: l }, null, 8, gl)
845
+ ]),
846
+ _: 1
847
+ }, 8, ["colNames", "head", "body", "config", "title"]))
848
+ ]),
849
+ _: 1
850
+ }, 8, ["config"])) : h("", !0)
851
+ ], 46, Mt));
852
+ }
853
+ }, Ll = /* @__PURE__ */ Vt(xl, [["__scopeId", "data-v-7e73d8b0"]]);
854
+ export {
855
+ Ll as default
856
+ };