vue-data-ui 3.0.0-next.3 → 3.0.0-next.30

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