vue-data-ui 3.0.0-next.2 → 3.0.0-next.21

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/{Arrow-Dck2Ea5K.js → Arrow-C3yKQTJs.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CatHZ1ns.js → BaseDraggableDialog-B2wP_11m.js} +2 -2
  4. package/dist/{BaseIcon-BmZ4MREl.js → BaseIcon-_brgsjLG.js} +1 -1
  5. package/dist/{useLoading-Bt5Doa8m.js → BaseScanner-DIK2NTdp.js} +11 -11
  6. package/dist/{ColorPicker-C1MXyD9Q.js → ColorPicker-CCG8G1nd.js} +2 -2
  7. package/dist/{DataTable-CgL0Rz0x.js → DataTable-C3ve--z6.js} +2 -2
  8. package/dist/{Legend-CYbP3Kfg.js → Legend-CX874XJp.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-CcbcJm_U.js → NonSvgPenAndPaper-CnTtK3iB.js} +3 -3
  10. package/dist/{PackageVersion-CAkNkiIG.js → PackageVersion-5l2M4Zh4.js} +1 -1
  11. package/dist/{PenAndPaper-Cx1-5zdD.js → PenAndPaper-CYEXrj4q.js} +3 -3
  12. package/dist/{Shape-DBXkGxKt.js → Shape-Du8dC9QE.js} +1 -1
  13. package/dist/{Slicer-nrMi5hzj.js → Slicer-D06CTSaX.js} +2 -2
  14. package/dist/{SparkTooltip-fNzL4pIU.js → SparkTooltip-DcX30xns.js} +1 -1
  15. package/dist/{Title-pVYRzQXY.js → Title-CItmidxn.js} +1 -1
  16. package/dist/{Tooltip-NwATo4ZJ.js → Tooltip-lhQXI9xT.js} +1 -1
  17. package/dist/{UserOptions-DAsRxxrf.js → UserOptions-mGHinyKk.js} +2 -2
  18. package/dist/{dom-to-png-BF_4H_6u.js → dom-to-png-juWKTR2G.js} +1 -1
  19. package/dist/{img-ku4zevVD.js → img-2Cyzq02w.js} +1 -1
  20. package/dist/{index-BzfnuLnw.js → index-DyWXkFFm.js} +799 -735
  21. package/dist/{pdf-CguiIsUc.js → pdf-C9bVIzob.js} +1 -1
  22. package/dist/style.css +1 -1
  23. package/dist/types/vue-data-ui.d.cts +113 -15
  24. package/dist/types/vue-data-ui.d.ts +113 -15
  25. package/dist/{useNestedProp-DorElw91.js → useNestedProp-5rJrnAmD.js} +1 -1
  26. package/dist/{usePrinter-C9qkgv0r.js → usePrinter-YV36Zq2L.js} +2 -2
  27. package/dist/useTimeLabelCollider-V7AOiPLB.js +71 -0
  28. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DFkUfjfs.js} +211 -152
  29. package/dist/{vue-data-ui-DQef_oFO.js → vue-data-ui-Br6XzNcY.js} +80 -74
  30. package/dist/vue-data-ui.js +54 -52
  31. package/dist/{vue-ui-3d-bar-DPSamIA-.js → vue-ui-3d-bar-BeZ4UXj1.js} +6 -6
  32. package/dist/{vue-ui-accordion-DgZK-qDz.js → vue-ui-accordion-_T76roov.js} +3 -3
  33. package/dist/{vue-ui-age-pyramid-DVeGKvf9.js → vue-ui-age-pyramid-DyILZmL1.js} +6 -6
  34. package/dist/{vue-ui-annotator-6ikkK-FK.js → vue-ui-annotator-D6vtgVKu.js} +2 -2
  35. package/dist/{vue-ui-bullet-Bg4hfFk2.js → vue-ui-bullet-CRL0nm0H.js} +7 -7
  36. package/dist/vue-ui-candlestick-Lv87ukLK.js +973 -0
  37. package/dist/{vue-ui-carousel-table-DitKhrFT.js → vue-ui-carousel-table-bQiT7iYL.js} +4 -4
  38. package/dist/{vue-ui-chestnut-D8wGAZod.js → vue-ui-chestnut-CshEgUb5.js} +5 -5
  39. package/dist/{vue-ui-chord-C-uTVCDP.js → vue-ui-chord-C_Gurj0k.js} +8 -8
  40. package/dist/{vue-ui-circle-pack-CPy6xcxv.js → vue-ui-circle-pack-DcDbc0cs.js} +6 -6
  41. package/dist/{vue-ui-cursor-Dd7vUd0q.js → vue-ui-cursor-BlANSWeT.js} +2 -2
  42. package/dist/{vue-ui-dashboard-CKurbu8M.js → vue-ui-dashboard-Dylth91b.js} +62 -62
  43. package/dist/{vue-ui-digits-DfdZI11G.js → vue-ui-digits-BISvEvKG.js} +2 -2
  44. package/dist/{vue-ui-donut-tECBFvud.js → vue-ui-donut-DJYRCCLe.js} +416 -401
  45. package/dist/{vue-ui-donut-evolution-CKbLO8yR.js → vue-ui-donut-evolution--nHID422.js} +9 -9
  46. package/dist/{vue-ui-dumbbell-DI5Lj3r_.js → vue-ui-dumbbell-CsZa3YKC.js} +7 -7
  47. package/dist/{vue-ui-flow-CjU48s9z.js → vue-ui-flow-D1YZHLf1.js} +7 -7
  48. package/dist/{vue-ui-funnel-DM_5vHZ4.js → vue-ui-funnel-KScJM0Sk.js} +6 -6
  49. package/dist/{vue-ui-galaxy-ocvZgZJx.js → vue-ui-galaxy-7I6nMU7k.js} +5 -5
  50. package/dist/{vue-ui-gauge-DajNoY-D.js → vue-ui-gauge-BWOeGXdp.js} +6 -6
  51. package/dist/{vue-ui-gizmo-DTnzeQbm.js → vue-ui-gizmo-C7Oci8xf.js} +3 -3
  52. package/dist/{vue-ui-heatmap-CfBS8jQe.js → vue-ui-heatmap-CeQq5YFh.js} +7 -7
  53. package/dist/{vue-ui-history-plot-BuOPWQoP.js → vue-ui-history-plot-C1R46zuZ.js} +7 -7
  54. package/dist/{vue-ui-kpi-DLGHOIRj.js → vue-ui-kpi-CXXCCBoi.js} +3 -3
  55. package/dist/{vue-ui-mini-loader-CHAHi4c9.js → vue-ui-mini-loader-BDeMu-HG.js} +2 -2
  56. package/dist/{vue-ui-molecule-R5-oDFeW.js → vue-ui-molecule-BG_Vm9Z-.js} +5 -5
  57. package/dist/{vue-ui-mood-radar-Ddf2gaES.js → vue-ui-mood-radar-68rvpqSe.js} +7 -7
  58. package/dist/vue-ui-nested-donuts-y7DnbLj7.js +1282 -0
  59. package/dist/{vue-ui-onion-D2n4zUkV.js → vue-ui-onion-cpCWH8CY.js} +7 -7
  60. package/dist/{vue-ui-parallel-coordinate-plot-CNWQqlxf.js → vue-ui-parallel-coordinate-plot-AXeySjsk.js} +8 -8
  61. package/dist/{vue-ui-quadrant-CxNj2FEx.js → vue-ui-quadrant-9-wXsL9m.js} +8 -8
  62. package/dist/{vue-ui-quick-chart-Bm_VmhJR.js → vue-ui-quick-chart-B_SOReEM.js} +7 -7
  63. package/dist/{vue-ui-radar-DSYMQJ6K.js → vue-ui-radar-BryqHi8h.js} +7 -7
  64. package/dist/{vue-ui-rating-BiQpwXnc.js → vue-ui-rating-Cm4WHdIj.js} +2 -2
  65. package/dist/{vue-ui-relation-circle-Cdxe78Bm.js → vue-ui-relation-circle-D-wNj3HG.js} +6 -6
  66. package/dist/{vue-ui-ridgeline-DpeM2hRi.js → vue-ui-ridgeline-B5y-Z_xt.js} +9 -9
  67. package/dist/{vue-ui-rings-BenmQHKv.js → vue-ui-rings-D-TtSoDJ.js} +8 -8
  68. package/dist/{vue-ui-scatter-mDMY1H6U.js → vue-ui-scatter-DzPgW23k.js} +8 -8
  69. package/dist/{vue-ui-skeleton-Ch_XkFuP.js → vue-ui-skeleton-QZs3A3_K.js} +3 -3
  70. package/dist/{vue-ui-smiley-DTig5lTU.js → vue-ui-smiley-ka3aFa0e.js} +2 -2
  71. package/dist/{vue-ui-spark-trend-BkDsp8E0.js → vue-ui-spark-trend-CJhdQ9Ls.js} +3 -3
  72. package/dist/{vue-ui-sparkbar-CgqoyBOm.js → vue-ui-sparkbar-CL5ZGdHd.js} +3 -3
  73. package/dist/{vue-ui-sparkgauge-B4jR_Y62.js → vue-ui-sparkgauge-C5Jdp3zp.js} +3 -3
  74. package/dist/{vue-ui-sparkhistogram-DfxjglLy.js → vue-ui-sparkhistogram-CHRRpkm0.js} +4 -4
  75. package/dist/{vue-ui-sparkline-M3QR8xJE.js → vue-ui-sparkline-B0r89-4E.js} +3 -3
  76. package/dist/{vue-ui-sparkstackbar-B2Ls-Mb8.js → vue-ui-sparkstackbar-l35guX1R.js} +3 -3
  77. package/dist/vue-ui-stackbar-AKs4GMxY.js +1354 -0
  78. package/dist/{vue-ui-strip-plot-B_ZLbu2D.js → vue-ui-strip-plot-uhUjZcif.js} +7 -7
  79. package/dist/{vue-ui-table-BhymhDOh.js → vue-ui-table-BbRxUiDQ.js} +3 -3
  80. package/dist/{vue-ui-table-heatmap-DokRh4dS.js → vue-ui-table-heatmap-CVdmaPTJ.js} +5 -5
  81. package/dist/{vue-ui-table-sparkline-DxBZGKZJ.js → vue-ui-table-sparkline-DJfVAI5W.js} +4 -4
  82. package/dist/{vue-ui-thermometer-e2L6IdF-.js → vue-ui-thermometer-BYx0gV05.js} +6 -6
  83. package/dist/{vue-ui-timer-BG2EwK3o.js → vue-ui-timer-DL2v49kR.js} +5 -5
  84. package/dist/{vue-ui-tiremarks-nzQH7woJ.js → vue-ui-tiremarks-LlgdqzTU.js} +6 -6
  85. package/dist/{vue-ui-treemap-CZxyi6fl.js → vue-ui-treemap-B2v9uGdI.js} +8 -8
  86. package/dist/vue-ui-vertical-bar-DSCAkzDF.js +1106 -0
  87. package/dist/{vue-ui-waffle-D399D4UE.js → vue-ui-waffle-DmNJRK-_.js} +8 -8
  88. package/dist/{vue-ui-wheel-DtcwtHzJ.js → vue-ui-wheel-ChRAwecI.js} +6 -6
  89. package/dist/{vue-ui-word-cloud-CTDceQsf.js → vue-ui-word-cloud-CELkzbyr.js} +6 -6
  90. package/dist/{vue-ui-world-BjNSbqMZ.js → vue-ui-world-BOJa-cTu.js} +6 -6
  91. package/dist/vue-ui-xy-DfeP_T81.js +3000 -0
  92. package/dist/{vue-ui-xy-canvas-BKAowbe0.js → vue-ui-xy-canvas-Dijs3J4M.js} +9 -9
  93. package/package.json +1 -1
  94. package/dist/vue-ui-candlestick-Bi59FGXn.js +0 -873
  95. package/dist/vue-ui-nested-donuts-CksklV83.js +0 -1177
  96. package/dist/vue-ui-stackbar-DIHkn6__.js +0 -1207
  97. package/dist/vue-ui-vertical-bar-DahdX1Sn.js +0 -980
  98. package/dist/vue-ui-xy-BkTP-JpK.js +0 -2958
@@ -0,0 +1,973 @@
1
+ import { defineAsyncComponent as U, computed as b, ref as r, toRefs as zt, watch as he, shallowRef as He, onMounted as St, onBeforeUnmount as We, watchEffect as Lt, nextTick as W, createElementBlock as u, openBlock as s, unref as n, normalizeStyle as fe, normalizeClass as Ge, createBlock as F, createCommentVNode as g, createElementVNode as d, createVNode as Xe, createSlots as Tt, withCtx as x, renderSlot as m, normalizeProps as R, guardReactiveProps as O, Fragment as N, renderList as P, toDisplayString as K, createTextVNode as It } from "vue";
2
+ import { u as Ft, c as Rt, A as Ot, a as Nt, C as Q, o as je, e as V, D as Pt, v as G, f as $, X as Vt, w as Z, s as Et, E as Ye, q as Bt, r as Mt, x as Ut, y as Dt } from "./index-DyWXkFFm.js";
3
+ import { t as qe, u as Ht } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Je } from "./useNestedProp-5rJrnAmD.js";
5
+ import { u as Wt } from "./usePrinter-YV36Zq2L.js";
6
+ import { u as Gt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Xt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import { u as jt, B as Yt } from "./BaseScanner-DIK2NTdp.js";
9
+ import qt from "./Title-CItmidxn.js";
10
+ import { S as Jt } from "./Slicer-D06CTSaX.js";
11
+ import { u as Kt } from "./useTimeLabels-DFkUfjfs.js";
12
+ import Qt from "./img-2Cyzq02w.js";
13
+ import { u as Zt } from "./useTimeLabelCollider-V7AOiPLB.js";
14
+ import { _ as el } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ const tl = ["id"], ll = ["xmlns", "aria-label", "viewBox"], al = ["x", "y", "width", "height"], ol = { key: 1 }, sl = ["id"], ul = ["stop-color"], il = ["stop-color"], nl = ["stop-color"], rl = ["id"], vl = ["stop-color"], dl = ["stop-color"], yl = ["stop-color"], cl = { key: 0 }, hl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], fl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], pl = ["x", "y", "font-size", "fill", "font-weight"], bl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], ml = ["transform", "text-anchor", "font-size", "fill", "font-weight"], xl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kl = { key: 0 }, wl = ["cx", "cy", "r", "fill"], Al = ["cx", "cy", "r", "fill"], _l = { key: 1 }, Cl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $l = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zl = ["x", "y", "height", "width", "fill", "rx"], Sl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Ll = ["x", "y", "height", "width", "fill", "onMouseover"], Tl = {
16
+ key: 4,
17
+ class: "vue-data-ui-watermark"
18
+ }, Il = ["innerHTML"], Fl = {
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(Ke, { expose: Qe }) {
35
+ const Ze = U(() => import("./vue-ui-accordion-_T76roov.js")), et = U(() => import("./DataTable-C3ve--z6.js")), tt = U(() => import("./PackageVersion-5l2M4Zh4.js")), lt = U(() => import("./PenAndPaper-CYEXrj4q.js")), at = U(() => import("./Tooltip-lhQXI9xT.js")), ot = U(() => import("./UserOptions-mGHinyKk.js")), { vue_ui_candlestick: st } = Ft(), c = Ke, ee = b(() => !!c.dataset && c.dataset.length), w = r(Rt()), ut = r(null), te = r(!1), le = r(""), ae = r(void 0), ge = r(0), z = r(null), pe = r(null), be = r(null), me = r(null), xe = r(null), ke = r(null), X = r(0), we = r(0), Ae = r(0), oe = r(null), D = r(null), e = r(ie()), { loading: _e, FINAL_DATASET: A, manualLoading: se } = jt({
36
+ ...zt(c),
37
+ FINAL_CONFIG: e,
38
+ prepareConfig: ie,
39
+ skeletonDataset: [
40
+ [17040672e5, 10, 20, 2, 10, 30],
41
+ [17067456e5, 10, 30, 5, 20, 50],
42
+ [17092512e5, 20, 50, 10, 30, 80],
43
+ [17119296e5, 30, 80, 20, 50, 130],
44
+ [17145216e5, 50, 130, 30, 100, 210],
45
+ [17172e8, 80, 210, 50, 150, 340],
46
+ [1719792e6, 130, 340, 80, 280, 550],
47
+ [17224704e5, 210, 550, 130, 50, 890],
48
+ [17251488e5, 340, 890, 210, 750, 1440],
49
+ [17277408e5, 550, 1440, 340, 1230, 2330],
50
+ [17304192e5, 890, 2330, 550, 1950, 3770],
51
+ [17330112e5, 1440, 3770, 890, 3200, 5100]
52
+ ],
53
+ skeletonConfig: Ot({
54
+ defaultConfig: e.value,
55
+ userConfig: {
56
+ useCssAnimation: !1,
57
+ userOptions: { show: !1 },
58
+ table: { show: !1 },
59
+ style: {
60
+ backgroundColor: "#99999930",
61
+ layout: {
62
+ candle: {
63
+ colors: {
64
+ bearish: "#BABABA",
65
+ bullish: "#CACACA"
66
+ }
67
+ },
68
+ grid: {
69
+ stroke: "#6A6A6A",
70
+ yAxis: {
71
+ dataLabels: { show: !1 },
72
+ scale: {
73
+ min: null,
74
+ max: null
75
+ }
76
+ }
77
+ },
78
+ wick: {
79
+ stroke: "#6A6A6A",
80
+ extremity: {
81
+ color: "#6A6A6A"
82
+ }
83
+ }
84
+ },
85
+ tooltip: { show: !1 },
86
+ zoom: {
87
+ show: !1,
88
+ startIndex: null,
89
+ endIndex: null
90
+ }
91
+ }
92
+ }
93
+ })
94
+ }), { userOptionsVisible: ue, setUserOptionsVisibility: Ce, keepUserOptionState: $e } = Gt({ config: e.value }), { svgRef: ze } = Xt({ config: e.value.style.title });
95
+ function ie() {
96
+ const t = Je({
97
+ userConfig: c.config,
98
+ defaultConfig: st
99
+ });
100
+ let a = {};
101
+ return t.theme ? a = {
102
+ ...Je({
103
+ userConfig: Nt.vue_ui_candlestick[t.theme] || c.config,
104
+ defaultConfig: t
105
+ })
106
+ } : a = t, c.config && Q(c.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = c.config.style.zoom.startIndex : a.style.zoom.startIndex = null, c.config && Q(c.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = c.config.style.zoom.endIndex : a.style.zoom.endIndex = null, c.config && Q(c.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = c.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, c.config && Q(c.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = c.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
107
+ }
108
+ he(() => c.config, (t) => {
109
+ _e.value || (e.value = ie()), ue.value = !e.value.userOptions.showOnChartHover, Se(), X.value += 1, Ae.value += 1, we.value += 1, _.value.showTable = e.value.table.show, _.value.showTooltip = e.value.style.tooltip.show;
110
+ }, { deep: !0 }), he(() => c.dataset, (t) => {
111
+ Array.isArray(t) && t.length > 0 && (se.value = !1), h.value.start = 0, h.value.end = t.length, X.value += 1;
112
+ }, { deep: !0 });
113
+ const y = r({
114
+ height: e.value.style.height,
115
+ width: e.value.style.width,
116
+ xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
117
+ yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
118
+ }), S = He(null), E = He(null);
119
+ St(() => {
120
+ Se();
121
+ });
122
+ const L = b(() => !!e.value.debug);
123
+ function Se() {
124
+ if (je(c.dataset) && (V({
125
+ componentName: "VueUiCandlestick",
126
+ type: "dataset",
127
+ debug: L.value
128
+ }), se.value = !0), je(c.dataset) || (se.value = e.value.loading), e.value.responsive) {
129
+ const a = qe(() => {
130
+ const { width: l, height: o } = Ht({
131
+ chart: z.value,
132
+ title: e.value.style.title.text ? pe.value : null,
133
+ slicer: me.value,
134
+ legend: be.value,
135
+ source: xe.value,
136
+ noTitle: ke.value
137
+ });
138
+ requestAnimationFrame(() => {
139
+ y.value.width = l, y.value.height = o - 12, e.value.responsiveProportionalSizing ? (y.value.xAxisFontSize = Ye({
140
+ relator: Math.min(l, o),
141
+ adjuster: e.value.style.width,
142
+ source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
143
+ threshold: 6,
144
+ fallback: 6
145
+ }), y.value.yAxisFontSize = Ye({
146
+ relator: Math.min(l, o),
147
+ adjuster: e.value.style.width,
148
+ source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
149
+ threshold: 6,
150
+ fallback: 6
151
+ })) : (y.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, y.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize);
152
+ });
153
+ });
154
+ S.value && (E.value && S.value.unobserve(E.value), S.value.disconnect()), S.value = new ResizeObserver(a), E.value = z.value.parentNode, S.value.observe(E.value);
155
+ }
156
+ Ve();
157
+ }
158
+ We(() => {
159
+ S.value && (E.value && S.value.unobserve(E.value), S.value.disconnect());
160
+ });
161
+ const { isPrinting: Le, isImaging: Te, generatePdf: Ie, generateImage: Fe } = Wt({
162
+ elementId: `vue-ui-candlestick_${w.value}`,
163
+ fileName: e.value.style.title.text || "vue-ui-candlestick",
164
+ options: e.value.userOptions.print
165
+ }), it = b(() => e.value.userOptions.show && !e.value.style.title.text), _ = r({
166
+ showTable: e.value.table.show,
167
+ showTooltip: e.value.style.tooltip.show
168
+ }), ne = r(0), nt = qe((t) => {
169
+ ne.value = t;
170
+ }, 100);
171
+ Lt((t) => {
172
+ const a = D.value;
173
+ if (!a) return;
174
+ const l = new ResizeObserver((o) => {
175
+ nt(o[0].contentRect.height);
176
+ });
177
+ l.observe(a), t(() => l.disconnect());
178
+ }), We(() => {
179
+ ne.value = 0;
180
+ });
181
+ const Re = b(() => {
182
+ let t = 0;
183
+ return D.value && (t = ne.value + y.value.xAxisFontSize), t;
184
+ });
185
+ function rt() {
186
+ let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
187
+ return oe.value && (t = Array.from(oe.value.querySelectorAll("text")).reduce((o, p) => {
188
+ const f = p.getComputedTextLength();
189
+ return f > o ? f : o;
190
+ }, 0)), t + 13;
191
+ }
192
+ const i = b(() => {
193
+ const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, p = rt(), f = 12;
194
+ return {
195
+ top: t + f,
196
+ right: y.value.width - a,
197
+ left: o + p,
198
+ bottom: y.value.height - l - Re.value,
199
+ width: y.value.width - o - a - p,
200
+ height: y.value.height - t - l - Re.value - f
201
+ };
202
+ }), H = b(() => A.value.length), h = r({
203
+ start: 0,
204
+ end: H.value
205
+ }), Oe = b(() => A.value.map((t, a) => ({
206
+ ...t,
207
+ absoluteIndex: a
208
+ })).slice(h.value.start, h.value.end)), re = b(() => (A.value.forEach((t, a) => {
209
+ [null, void 0].includes(t[0]) && V({
210
+ componentName: "VueUiCandlestick",
211
+ type: "datasetAttribute",
212
+ property: "period (index 0)",
213
+ index: a,
214
+ debug: L.value
215
+ }), [null, void 0].includes(t[1]) && V({
216
+ componentName: "VueUiCandlestick",
217
+ type: "datasetAttribute",
218
+ property: "open (index 1)",
219
+ index: a,
220
+ debug: L.value
221
+ }), [null, void 0].includes(t[2]) && V({
222
+ componentName: "VueUiCandlestick",
223
+ type: "datasetAttribute",
224
+ property: "high (index 2)",
225
+ index: a,
226
+ debug: L.value
227
+ }), [null, void 0].includes(t[3]) && V({
228
+ componentName: "VueUiCandlestick",
229
+ type: "datasetAttribute",
230
+ property: "low (index 3)",
231
+ index: a,
232
+ debug: L.value
233
+ }), [null, void 0].includes(t[4]) && V({
234
+ componentName: "VueUiCandlestick",
235
+ type: "datasetAttribute",
236
+ property: "last (index 4)",
237
+ index: a,
238
+ debug: L.value
239
+ }), [null, void 0].includes(t[5]) && V({
240
+ componentName: "VueUiCandlestick",
241
+ type: "datasetAttribute",
242
+ property: "volume (index 5)",
243
+ index: a,
244
+ debug: L.value
245
+ });
246
+ }), Oe.value.map((t) => ({
247
+ absoluteIndex: t.absoluteIndex,
248
+ period: t[0],
249
+ open: t[1],
250
+ high: t[2],
251
+ low: t[3],
252
+ last: t[4],
253
+ volume: t[5]
254
+ })))), v = b(() => i.value.width / Oe.value.length), Ne = b(() => {
255
+ const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...re.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;
256
+ return {
257
+ max: t,
258
+ min: a
259
+ };
260
+ }), C = b(() => Pt(Ne.value.min, Ne.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
261
+ function j(t, a) {
262
+ return {
263
+ ...t,
264
+ x: G(i.value.left + a * v.value + v.value / 2),
265
+ y: G(i.value.top + (1 - (t - C.value.min) / (C.value.max - C.value.min)) * i.value.height),
266
+ value: G(t)
267
+ };
268
+ }
269
+ const k = b(() => re.value.map((t, a) => {
270
+ const l = j(t.open, a), o = j(t.high, a), p = j(t.low, a), f = j(t.last, a), I = t.last > t.open;
271
+ return {
272
+ period: t.period,
273
+ open: l,
274
+ high: o,
275
+ low: p,
276
+ last: f,
277
+ volume: t.volume,
278
+ isBullish: I,
279
+ absoluteIndex: t.absoluteIndex
280
+ };
281
+ }));
282
+ function vt(t) {
283
+ return G((t - C.value.min) / (C.value.max - C.value.min));
284
+ }
285
+ const dt = b(() => C.value.ticks.map((t) => ({
286
+ y: i.value.bottom - i.value.height * vt(t),
287
+ value: G(t)
288
+ }))), yt = b(() => re.value.map((t) => t.period)), T = b(() => Kt({
289
+ values: A.value.map((t) => t[0]),
290
+ maxDatapoints: A.value.length,
291
+ formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
292
+ start: h.value.start,
293
+ end: h.value.end
294
+ })), Pe = b(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
295
+ start: T.value.find((t) => t.absoluteIndex === h.value.start).text,
296
+ end: T.value.find((t) => t.absoluteIndex === h.value.end - 1).text
297
+ } : {
298
+ start: A.value[h.value.start] ? A.value[h.value.start][0] : A.value[0][0],
299
+ end: A.value[h.value.end - 1] ? A.value[h.value.end - 1][0] : A.value.at(-1)[0]
300
+ }), ve = r(null);
301
+ function ct(t, a) {
302
+ ae.value = t, ve.value = {
303
+ datapoint: a,
304
+ seriesIndex: t,
305
+ series: k.value,
306
+ config: e.value
307
+ };
308
+ const l = e.value.style.tooltip.customFormat;
309
+ if (Ut(l) && Dt(() => l({
310
+ seriesIndex: t,
311
+ datapoint: a,
312
+ series: k.value,
313
+ config: e.value
314
+ })))
315
+ le.value = l({
316
+ seriesIndex: t,
317
+ datapoint: a,
318
+ series: k.value,
319
+ config: e.value
320
+ });
321
+ else if (e.value.style.tooltip.show) {
322
+ let o = "";
323
+ const { period: p, open: f, high: I, low: ye, last: ce, volume: J, isBullish: De } = k.value[t], { period: Rl, open: pt, high: bt, low: mt, last: xt, volume: kt } = e.value.translations, wt = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? T.value[t].text : p;
324
+ 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}"
325
+ fill="${e.value.style.layout.candle.gradient.show ? De ? `url(#bullish_gradient_${w.value})` : `url(#bearish_gradient_${w.value})` : De ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${wt}</div>`, o += `${kt} : <b>${isNaN(J) ? "-" : Number(J.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}">`;
326
+ const At = $({
327
+ p: e.value.style.tooltip.prefix,
328
+ v: f.value,
329
+ s: e.value.style.tooltip.suffix,
330
+ r: e.value.style.tooltip.roundingValue
331
+ });
332
+ o += `<div>${pt}: <b>${At}</b></div>`;
333
+ const _t = $({
334
+ p: e.value.style.tooltip.prefix,
335
+ v: I.value,
336
+ s: e.value.style.tooltip.suffix,
337
+ r: e.value.style.tooltip.roundingValue
338
+ });
339
+ o += `<div>${bt}: <b>${_t}</b></div>`;
340
+ const Ct = $({
341
+ p: e.value.style.tooltip.prefix,
342
+ v: ye.value,
343
+ s: e.value.style.tooltip.suffix,
344
+ r: e.value.style.tooltip.roundingValue
345
+ });
346
+ o += `<div>${mt}: <b>${Ct}</b></div>`;
347
+ const $t = $({
348
+ p: e.value.style.tooltip.prefix,
349
+ v: ce.value,
350
+ s: e.value.style.tooltip.suffix,
351
+ r: e.value.style.tooltip.roundingValue
352
+ });
353
+ o += `<div>${xt}: <b>${$t}</b></div>`, o += "</div>", le.value = `<div style="text-align:right">${o}</div>`;
354
+ }
355
+ te.value = !0;
356
+ }
357
+ function ht() {
358
+ Ve();
359
+ }
360
+ const B = r(null);
361
+ async function Ve() {
362
+ (e.value.style.zoom.startIndex !== null || e.value.style.zoom.endIndex !== null) && B.value ? (e.value.style.zoom.startIndex !== null && (await W(), await W(), B.value && B.value.setStartValue(e.value.style.zoom.startIndex)), e.value.style.zoom.endIndex !== null && (await W(), await W(), B.value && B.value.setEndValue(ft(e.value.style.zoom.endIndex + 1)))) : (h.value = {
363
+ start: 0,
364
+ end: H.value
365
+ }, X.value += 1);
366
+ }
367
+ function ft(t) {
368
+ const a = H.value;
369
+ 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;
370
+ }
371
+ function Ee(t = null) {
372
+ W(() => {
373
+ 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, I) => [
374
+ e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? T.value[I].text : f.period,
375
+ f.open.value,
376
+ f.high.value,
377
+ f.low.value,
378
+ f.last.value,
379
+ f.volume
380
+ ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), p = Bt(o);
381
+ t ? t(p) : Mt({ csvContent: p, title: e.value.style.title.text || "vue-ui-candlestick" });
382
+ });
383
+ }
384
+ const Y = b(() => {
385
+ const t = k.value.map((o, p) => {
386
+ const f = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? T.value[p].text : o.period, I = $({
387
+ p: e.value.table.td.prefix,
388
+ v: o.open.value,
389
+ s: e.value.table.td.suffix,
390
+ r: e.value.table.td.roundingValue
391
+ }), ye = $({
392
+ p: e.value.table.td.prefix,
393
+ v: o.high.value,
394
+ s: e.value.table.td.suffix,
395
+ r: e.value.table.td.roundingValue
396
+ }), ce = $({
397
+ p: e.value.table.td.prefix,
398
+ v: o.low.value,
399
+ s: e.value.table.td.suffix,
400
+ r: e.value.table.td.roundingValue
401
+ }), J = $({
402
+ p: e.value.table.td.prefix,
403
+ v: o.last.value,
404
+ s: e.value.table.td.suffix,
405
+ r: e.value.table.td.roundingValue
406
+ });
407
+ return [
408
+ `<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}`,
409
+ I,
410
+ ye,
411
+ ce,
412
+ J,
413
+ `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
414
+ ];
415
+ }), a = {
416
+ th: {
417
+ backgroundColor: e.value.table.th.backgroundColor,
418
+ color: e.value.table.th.color,
419
+ outline: e.value.table.th.outline
420
+ },
421
+ td: {
422
+ backgroundColor: e.value.table.td.backgroundColor,
423
+ color: e.value.table.td.color,
424
+ outline: e.value.table.td.outline
425
+ },
426
+ breakpoint: e.value.table.responsiveBreakpoint
427
+ }, l = [
428
+ e.value.translations.period,
429
+ e.value.translations.open,
430
+ e.value.translations.high,
431
+ e.value.translations.low,
432
+ e.value.translations.last,
433
+ e.value.translations.volume
434
+ ];
435
+ return { head: l, body: t, config: a, colNames: l };
436
+ }), M = r(!1);
437
+ function Be(t) {
438
+ M.value = t, ge.value += 1;
439
+ }
440
+ function Me() {
441
+ _.value.showTable = !_.value.showTable;
442
+ }
443
+ function Ue() {
444
+ _.value.showTooltip = !_.value.showTooltip;
445
+ }
446
+ const q = r(!1);
447
+ function de() {
448
+ q.value = !q.value;
449
+ }
450
+ async function gt({ scale: t = 2 } = {}) {
451
+ if (!z.value) return;
452
+ const { width: a, height: l } = z.value.getBoundingClientRect(), o = a / l, { imageUri: p, base64: f } = await Qt({ domElement: z.value, base64: !0, img: !0, scale: t });
453
+ return {
454
+ imageUri: p,
455
+ base64: f,
456
+ title: e.value.style.title.text,
457
+ width: a,
458
+ height: l,
459
+ aspectRatio: o
460
+ };
461
+ }
462
+ return Zt({
463
+ timeLabelsEls: D,
464
+ timeLabels: T,
465
+ slicer: h,
466
+ configRef: e,
467
+ rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
468
+ autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate"],
469
+ isAutoSize: !1
470
+ }), he(e, () => {
471
+ _.value = {
472
+ showTable: e.value.table.show,
473
+ showTooltip: e.value.style.tooltip.show
474
+ };
475
+ }, { immediate: !0 }), Qe({
476
+ getImage: gt,
477
+ generatePdf: Ie,
478
+ generateCsv: Ee,
479
+ generateImage: Fe,
480
+ toggleTable: Me,
481
+ toggleTooltip: Ue,
482
+ toggleAnnotator: de,
483
+ toggleFullscreen: Be
484
+ }), (t, a) => (s(), u("div", {
485
+ ref_key: "candlestickChart",
486
+ ref: z,
487
+ class: Ge(`vue-ui-candlestick ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
488
+ style: fe(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
489
+ id: `vue-ui-candlestick_${w.value}`,
490
+ onMouseenter: a[4] || (a[4] = () => n(Ce)(!0)),
491
+ onMouseleave: a[5] || (a[5] = () => n(Ce)(!1))
492
+ }, [
493
+ e.value.userOptions.buttons.annotator ? (s(), F(n(lt), {
494
+ key: 0,
495
+ svgRef: n(ze),
496
+ backgroundColor: e.value.style.backgroundColor,
497
+ color: e.value.style.color,
498
+ active: q.value,
499
+ onClose: de
500
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
501
+ it.value ? (s(), u("div", {
502
+ key: 1,
503
+ ref_key: "noTitle",
504
+ ref: ke,
505
+ class: "vue-data-ui-no-title-space",
506
+ style: "height:36px; width: 100%;background:transparent"
507
+ }, null, 512)) : g("", !0),
508
+ e.value.style.title.text ? (s(), u("div", {
509
+ key: 2,
510
+ ref_key: "chartTitle",
511
+ ref: pe,
512
+ style: "width:100%;background:transparent"
513
+ }, [
514
+ (s(), F(qt, {
515
+ key: `title_${Ae.value}`,
516
+ config: {
517
+ title: {
518
+ cy: "candlestick-div-title",
519
+ ...e.value.style.title
520
+ },
521
+ subtitle: {
522
+ cy: "candlestick-div-subtitle",
523
+ ...e.value.style.title.subtitle
524
+ }
525
+ }
526
+ }, null, 8, ["config"]))
527
+ ], 512)) : g("", !0),
528
+ e.value.userOptions.show && ee.value && (n($e) || n(ue)) ? (s(), F(n(ot), {
529
+ ref_key: "details",
530
+ ref: ut,
531
+ key: `user_options_${ge.value}`,
532
+ backgroundColor: e.value.style.backgroundColor,
533
+ color: e.value.style.color,
534
+ isImaging: n(Te),
535
+ isPrinting: n(Le),
536
+ uid: w.value,
537
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
538
+ hasPdf: e.value.userOptions.buttons.pdf,
539
+ hasImg: e.value.userOptions.buttons.img,
540
+ hasXls: e.value.userOptions.buttons.csv,
541
+ hasTable: e.value.userOptions.buttons.table,
542
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
543
+ isFullscreen: M.value,
544
+ isTooltip: _.value.showTooltip,
545
+ titles: { ...e.value.userOptions.buttonTitles },
546
+ chartElement: z.value,
547
+ position: e.value.userOptions.position,
548
+ hasAnnotator: e.value.userOptions.buttons.annotator,
549
+ isAnnotation: q.value,
550
+ callbacks: e.value.userOptions.callbacks,
551
+ printScale: e.value.userOptions.print.scale,
552
+ onToggleFullscreen: Be,
553
+ onGeneratePdf: n(Ie),
554
+ onGenerateCsv: Ee,
555
+ onGenerateImage: n(Fe),
556
+ onToggleTable: Me,
557
+ onToggleTooltip: Ue,
558
+ onToggleAnnotator: de,
559
+ style: fe({
560
+ visibility: n($e) ? n(ue) ? "visible" : "hidden" : "visible"
561
+ })
562
+ }, Tt({ _: 2 }, [
563
+ t.$slots.menuIcon ? {
564
+ name: "menuIcon",
565
+ fn: x(({ isOpen: l, color: o }) => [
566
+ m(t.$slots, "menuIcon", R(O({ isOpen: l, color: o })), void 0, !0)
567
+ ]),
568
+ key: "0"
569
+ } : void 0,
570
+ t.$slots.optionTooltip ? {
571
+ name: "optionTooltip",
572
+ fn: x(() => [
573
+ m(t.$slots, "optionTooltip", {}, void 0, !0)
574
+ ]),
575
+ key: "1"
576
+ } : void 0,
577
+ t.$slots.optionPdf ? {
578
+ name: "optionPdf",
579
+ fn: x(() => [
580
+ m(t.$slots, "optionPdf", {}, void 0, !0)
581
+ ]),
582
+ key: "2"
583
+ } : void 0,
584
+ t.$slots.optionCsv ? {
585
+ name: "optionCsv",
586
+ fn: x(() => [
587
+ m(t.$slots, "optionCsv", {}, void 0, !0)
588
+ ]),
589
+ key: "3"
590
+ } : void 0,
591
+ t.$slots.optionImg ? {
592
+ name: "optionImg",
593
+ fn: x(() => [
594
+ m(t.$slots, "optionImg", {}, void 0, !0)
595
+ ]),
596
+ key: "4"
597
+ } : void 0,
598
+ t.$slots.optionTable ? {
599
+ name: "optionTable",
600
+ fn: x(() => [
601
+ m(t.$slots, "optionTable", {}, void 0, !0)
602
+ ]),
603
+ key: "5"
604
+ } : void 0,
605
+ t.$slots.optionFullscreen ? {
606
+ name: "optionFullscreen",
607
+ fn: x(({ toggleFullscreen: l, isFullscreen: o }) => [
608
+ m(t.$slots, "optionFullscreen", R(O({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
609
+ ]),
610
+ key: "6"
611
+ } : void 0,
612
+ t.$slots.optionAnnotator ? {
613
+ name: "optionAnnotator",
614
+ fn: x(({ toggleAnnotator: l, isAnnotator: o }) => [
615
+ m(t.$slots, "optionAnnotator", R(O({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
616
+ ]),
617
+ key: "7"
618
+ } : void 0
619
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
620
+ (s(), u("svg", {
621
+ ref_key: "svgRef",
622
+ ref: ze,
623
+ xmlns: n(Vt),
624
+ "aria-label": e.value.style.title.text || "candlestick chart",
625
+ class: Ge({ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }),
626
+ viewBox: `0 0 ${y.value.width <= 0 ? 10 : y.value.width} ${y.value.height <= 0 ? 10 : y.value.height}`,
627
+ style: fe(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
628
+ }, [
629
+ Xe(n(tt)),
630
+ t.$slots["chart-background"] ? (s(), u("foreignObject", {
631
+ key: 0,
632
+ x: i.value.left,
633
+ y: i.value.top,
634
+ width: Math.max(0.1, i.value.width),
635
+ height: Math.max(0.1, i.value.height),
636
+ style: {
637
+ pointerEvents: "none"
638
+ }
639
+ }, [
640
+ m(t.$slots, "chart-background", {}, void 0, !0)
641
+ ], 8, al)) : g("", !0),
642
+ k.value.length > 0 ? (s(), u("g", ol, [
643
+ d("defs", null, [
644
+ d("linearGradient", {
645
+ id: `bearish_gradient_${w.value}`,
646
+ x2: "0%",
647
+ y2: "100%"
648
+ }, [
649
+ d("stop", {
650
+ offset: "0%",
651
+ "stop-color": e.value.style.layout.candle.colors.bearish
652
+ }, null, 8, ul),
653
+ d("stop", {
654
+ offset: "50%",
655
+ "stop-color": `${n(Z)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
656
+ }, null, 8, il),
657
+ d("stop", {
658
+ offset: "100%",
659
+ "stop-color": `${n(Z)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
660
+ }, null, 8, nl)
661
+ ], 8, sl),
662
+ d("linearGradient", {
663
+ id: `bullish_gradient_${w.value}`,
664
+ x2: "0%",
665
+ y2: "100%"
666
+ }, [
667
+ d("stop", {
668
+ offset: "0%",
669
+ "stop-color": e.value.style.layout.candle.colors.bullish
670
+ }, null, 8, vl),
671
+ d("stop", {
672
+ offset: "50%",
673
+ "stop-color": `${n(Z)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
674
+ }, null, 8, dl),
675
+ d("stop", {
676
+ offset: "100%",
677
+ "stop-color": `${n(Z)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
678
+ }, null, 8, yl)
679
+ ], 8, rl)
680
+ ]),
681
+ e.value.style.layout.grid.show ? (s(), u("g", cl, [
682
+ d("line", {
683
+ x1: i.value.left,
684
+ x2: i.value.left,
685
+ y1: i.value.top,
686
+ y2: i.value.bottom,
687
+ stroke: e.value.style.layout.grid.stroke,
688
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
689
+ "stroke-linecap": "round"
690
+ }, null, 8, hl),
691
+ d("line", {
692
+ x1: i.value.left,
693
+ x2: i.value.right,
694
+ y1: i.value.bottom,
695
+ y2: i.value.bottom,
696
+ stroke: e.value.style.layout.grid.stroke,
697
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
698
+ "stroke-linecap": "round"
699
+ }, null, 8, fl)
700
+ ])) : g("", !0),
701
+ e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g", {
702
+ key: 1,
703
+ ref_key: "scaleLabels",
704
+ ref: oe
705
+ }, [
706
+ (s(!0), u(N, null, P(dt.value, (l, o) => (s(), u("g", null, [
707
+ l.value >= C.value.min && l.value <= C.value.max ? (s(), u("line", {
708
+ key: 0,
709
+ x1: i.value.left,
710
+ x2: i.value.left - 5,
711
+ y1: l.y,
712
+ y2: l.y,
713
+ stroke: e.value.style.layout.grid.stroke,
714
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
715
+ "stroke-linecap": "round"
716
+ }, null, 8, gl)) : g("", !0),
717
+ l.value >= C.value.min && l.value <= C.value.max ? (s(), u("text", {
718
+ key: 1,
719
+ x: i.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
720
+ y: l.y + y.value.yAxisFontSize / 3,
721
+ "font-size": y.value.yAxisFontSize,
722
+ "text-anchor": "end",
723
+ fill: e.value.style.layout.grid.yAxis.dataLabels.color,
724
+ "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
725
+ }, K(n($)({
726
+ p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
727
+ v: l.value,
728
+ s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
729
+ r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
730
+ })), 9, pl)) : g("", !0)
731
+ ]))), 256))
732
+ ], 512)) : g("", !0),
733
+ e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", {
734
+ key: 2,
735
+ ref_key: "timeLabelsEls",
736
+ ref: D
737
+ }, [
738
+ (s(!0), u(N, null, P(yt.value, (l, o) => (s(), u("g", null, [
739
+ d("text", {
740
+ class: "vue-data-ui-time-label",
741
+ transform: `translate(${i.value.left + v.value * o + v.value / 2}, ${i.value.bottom + y.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
742
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
743
+ "font-size": y.value.xAxisFontSize,
744
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
745
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
746
+ }, K(l), 9, bl)
747
+ ]))), 256))
748
+ ], 512)) : g("", !0),
749
+ e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", {
750
+ key: 3,
751
+ ref_key: "timeLabelsEls",
752
+ ref: D
753
+ }, [
754
+ (s(!0), u(N, null, P(T.value, (l, o) => (s(), u("g", null, [
755
+ d("text", {
756
+ class: "vue-data-ui-time-label",
757
+ transform: `translate(${i.value.left + v.value * o + v.value / 2}, ${i.value.bottom + y.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
758
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
759
+ "font-size": y.value.xAxisFontSize,
760
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
761
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
762
+ }, K(l.text), 9, ml)
763
+ ]))), 256))
764
+ ], 512)) : g("", !0),
765
+ d("g", null, [
766
+ (s(!0), u(N, null, P(k.value, (l, o) => (s(), u("g", null, [
767
+ d("line", {
768
+ x1: l.open.x,
769
+ x2: l.open.x,
770
+ y1: l.high.y,
771
+ y2: l.low.y,
772
+ stroke: e.value.style.layout.wick.stroke,
773
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
774
+ "stroke-linecap": "round"
775
+ }, null, 8, xl),
776
+ e.value.style.layout.wick.extremity.shape === "circle" ? (s(), u("g", kl, [
777
+ d("circle", {
778
+ cx: l.high.x,
779
+ cy: l.high.y,
780
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
781
+ fill: e.value.style.layout.wick.extremity.color
782
+ }, null, 8, wl),
783
+ d("circle", {
784
+ cx: l.low.x,
785
+ cy: l.low.y,
786
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
787
+ fill: e.value.style.layout.wick.extremity.color
788
+ }, null, 8, Al)
789
+ ])) : g("", !0),
790
+ e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g", _l, [
791
+ d("line", {
792
+ x1: 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,
793
+ x2: 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,
794
+ y1: l.high.y,
795
+ y2: l.high.y,
796
+ stroke: e.value.style.layout.wick.extremity.color,
797
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
798
+ "stroke-linecap": "round"
799
+ }, null, 8, Cl),
800
+ d("line", {
801
+ x1: 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,
802
+ x2: 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,
803
+ y1: l.low.y,
804
+ y2: l.low.y,
805
+ stroke: e.value.style.layout.wick.extremity.color,
806
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
807
+ "stroke-linecap": "round"
808
+ }, null, 8, $l)
809
+ ])) : g("", !0)
810
+ ]))), 256))
811
+ ]),
812
+ d("g", null, [
813
+ (s(!0), u(N, null, P(k.value, (l, o) => (s(), u("rect", {
814
+ x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
815
+ y: l.isBullish ? l.last.y : l.open.y,
816
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
817
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
818
+ fill: e.value.style.layout.candle.gradient.underlayer,
819
+ rx: e.value.style.layout.candle.borderRadius,
820
+ stroke: "none"
821
+ }, null, 8, zl))), 256)),
822
+ (s(!0), u(N, null, P(k.value, (l, o) => (s(), u("rect", {
823
+ x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
824
+ y: l.isBullish ? l.last.y : l.open.y,
825
+ height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
826
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
827
+ 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,
828
+ rx: e.value.style.layout.candle.borderRadius,
829
+ stroke: e.value.style.layout.candle.stroke,
830
+ "stroke-width": e.value.style.layout.candle.strokeWidth,
831
+ "stroke-linecap": "round",
832
+ "stroke-linejoin": "round"
833
+ }, null, 8, Sl))), 256))
834
+ ]),
835
+ d("g", null, [
836
+ (s(!0), u(N, null, P(k.value, (l, o) => (s(), u("rect", {
837
+ x: i.value.left + o * v.value,
838
+ y: i.value.top,
839
+ height: i.value.height <= 0 ? 1e-4 : i.value.height,
840
+ width: v.value <= 0 ? 1e-4 : v.value,
841
+ fill: ae.value === o ? n(Et)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
842
+ onMouseover: (p) => ct(o, l),
843
+ onMouseleave: a[0] || (a[0] = (p) => {
844
+ ae.value = void 0, te.value = !1;
845
+ })
846
+ }, null, 40, Ll))), 256))
847
+ ])
848
+ ])) : g("", !0),
849
+ m(t.$slots, "svg", { svg: y.value }, void 0, !0)
850
+ ], 14, ll)),
851
+ t.$slots.watermark ? (s(), u("div", Tl, [
852
+ m(t.$slots, "watermark", R(O({ isPrinting: n(Le) || n(Te) })), void 0, !0)
853
+ ])) : g("", !0),
854
+ e.value.style.zoom.show && ee.value ? (s(), u("div", {
855
+ key: 5,
856
+ ref_key: "chartSlicer",
857
+ ref: me
858
+ }, [
859
+ (s(), F(Jt, {
860
+ ref_key: "slicerComponent",
861
+ ref: B,
862
+ key: `slicer_${X.value}`,
863
+ background: e.value.style.zoom.color,
864
+ borderColor: e.value.style.backgroundColor,
865
+ fontSize: e.value.style.zoom.fontSize,
866
+ useResetSlot: e.value.style.zoom.useResetSlot,
867
+ labelLeft: Pe.value.start,
868
+ labelRight: Pe.value.end,
869
+ textColor: e.value.style.color,
870
+ inputColor: e.value.style.zoom.color,
871
+ selectColor: e.value.style.zoom.highlightColor,
872
+ max: H.value,
873
+ min: 0,
874
+ valueStart: h.value.start,
875
+ valueEnd: h.value.end,
876
+ start: h.value.start,
877
+ "onUpdate:start": a[1] || (a[1] = (l) => h.value.start = l),
878
+ end: h.value.end,
879
+ "onUpdate:end": a[2] || (a[2] = (l) => h.value.end = l),
880
+ refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
881
+ refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : H.value,
882
+ enableRangeHandles: e.value.style.zoom.enableRangeHandles,
883
+ enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
884
+ onReset: ht
885
+ }, {
886
+ "reset-action": x(({ reset: l }) => [
887
+ m(t.$slots, "reset-action", R(O({ reset: l })), void 0, !0)
888
+ ]),
889
+ _: 3
890
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
891
+ ], 512)) : g("", !0),
892
+ d("div", {
893
+ ref_key: "chartLegend",
894
+ ref: be
895
+ }, [
896
+ m(t.$slots, "legend", { legend: k.value }, void 0, !0)
897
+ ], 512),
898
+ t.$slots.source ? (s(), u("div", {
899
+ key: 6,
900
+ ref_key: "source",
901
+ ref: xe,
902
+ dir: "auto"
903
+ }, [
904
+ m(t.$slots, "source", {}, void 0, !0)
905
+ ], 512)) : g("", !0),
906
+ Xe(n(at), {
907
+ show: _.value.showTooltip && te.value,
908
+ backgroundColor: e.value.style.tooltip.backgroundColor,
909
+ color: e.value.style.tooltip.color,
910
+ borderRadius: e.value.style.tooltip.borderRadius,
911
+ borderColor: e.value.style.tooltip.borderColor,
912
+ borderWidth: e.value.style.tooltip.borderWidth,
913
+ fontSize: e.value.style.tooltip.fontSize,
914
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
915
+ position: e.value.style.tooltip.position,
916
+ offsetY: e.value.style.tooltip.offsetY,
917
+ parent: z.value,
918
+ content: le.value,
919
+ isFullscreen: M.value,
920
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
921
+ }, {
922
+ "tooltip-before": x(() => [
923
+ m(t.$slots, "tooltip-before", R(O({ ...ve.value })), void 0, !0)
924
+ ]),
925
+ "tooltip-after": x(() => [
926
+ m(t.$slots, "tooltip-after", R(O({ ...ve.value })), void 0, !0)
927
+ ]),
928
+ _: 3
929
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
930
+ ee.value ? (s(), F(n(Ze), {
931
+ key: 7,
932
+ hideDetails: "",
933
+ config: {
934
+ open: _.value.showTable,
935
+ maxHeight: 1e4,
936
+ body: {
937
+ backgroundColor: e.value.style.backgroundColor,
938
+ color: e.value.style.color
939
+ },
940
+ head: {
941
+ backgroundColor: e.value.style.backgroundColor,
942
+ color: e.value.style.color
943
+ }
944
+ }
945
+ }, {
946
+ content: x(() => [
947
+ (s(), F(n(et), {
948
+ key: `table_${we.value}`,
949
+ colNames: Y.value.colNames,
950
+ head: Y.value.head,
951
+ body: Y.value.body,
952
+ config: Y.value.config,
953
+ title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
954
+ onClose: a[3] || (a[3] = (l) => _.value.showTable = !1)
955
+ }, {
956
+ th: x(({ th: l }) => [
957
+ It(K(l), 1)
958
+ ]),
959
+ td: x(({ td: l }) => [
960
+ d("div", { innerHTML: l }, null, 8, Il)
961
+ ]),
962
+ _: 1
963
+ }, 8, ["colNames", "head", "body", "config", "title"]))
964
+ ]),
965
+ _: 1
966
+ }, 8, ["config"])) : g("", !0),
967
+ n(_e) ? (s(), F(Yt, { key: 8 })) : g("", !0)
968
+ ], 46, tl));
969
+ }
970
+ }, Yl = /* @__PURE__ */ el(Fl, [["__scopeId", "data-v-78eb5f28"]]);
971
+ export {
972
+ Yl as default
973
+ };