vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,873 +0,0 @@
1
- import { defineAsyncComponent as I, computed as f, ref as y, watch as Oe, shallowRef as Ne, onMounted as pt, onBeforeUnmount as ft, nextTick as D, createElementBlock as u, openBlock as s, unref as r, normalizeStyle as ie, normalizeClass as Pe, createBlock as T, createCommentVNode as h, createElementVNode as v, createVNode as Ve, createSlots as gt, withCtx as m, renderSlot as g, normalizeProps as L, guardReactiveProps as F, Fragment as R, renderList as O, toDisplayString as q, createTextVNode as xt } from "vue";
2
- import { u as mt, c as bt, a as kt, C as J, o as wt, e as N, D as _t, v as W, f as $, X as Ct, w as K, s as $t, E as Ee, q as At, r as zt, x as St, y as It } from "./index-Cg-RjxqH.js";
3
- import { t as Tt, u as Lt } from "./useResponsive-DfdjqQps.js";
4
- import { u as Me } from "./useNestedProp-C_G5E08Y.js";
5
- import { u as Ft } from "./usePrinter-BUzmyQf9.js";
6
- import { u as Rt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Ot } from "./useChartAccessibility-9icAAmYg.js";
8
- import Nt from "./Title-B7Xb3YuE.js";
9
- import { S as Pt } from "./Slicer-BD8Z8VCW.js";
10
- import { u as Vt } from "./useTimeLabels-Mrr0jrpL.js";
11
- import Et from "./img-D72yZNUg.js";
12
- import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const Bt = ["id"], Ut = ["xmlns", "aria-label", "viewBox"], Dt = ["x", "y", "width", "height"], Wt = { key: 1 }, Gt = ["id"], Ht = ["stop-color"], jt = ["stop-color"], Xt = ["stop-color"], Yt = ["id"], qt = ["stop-color"], Jt = ["stop-color"], Kt = ["stop-color"], Qt = { key: 0 }, Zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tl = { key: 1 }, ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], al = ["x", "y", "font-size", "fill", "font-weight"], ol = { key: 2 }, sl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], ul = { key: 3 }, il = ["transform", "text-anchor", "font-size", "fill", "font-weight"], nl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rl = { key: 0 }, dl = ["cx", "cy", "r", "fill"], vl = ["cx", "cy", "r", "fill"], yl = { key: 1 }, cl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], hl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], pl = ["x", "y", "height", "width", "fill", "rx"], fl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], gl = ["x", "y", "height", "width", "fill", "onMouseover"], xl = {
14
- key: 5,
15
- class: "vue-data-ui-watermark"
16
- }, ml = ["innerHTML"], bl = {
17
- __name: "vue-ui-candlestick",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- setup(Be, { expose: Ue }) {
33
- const De = I(() => import("./vue-ui-accordion-CRomxzaL.js")), We = I(() => import("./DataTable-mQ6Wd-rR.js")), Ge = I(() => import("./PackageVersion-CeEYZfaH.js")), He = I(() => import("./PenAndPaper-DhSxfUrQ.js")), je = I(() => import("./vue-ui-skeleton-CUOhCY4p.js")), Xe = I(() => import("./Tooltip-BidRoM5E.js")), Ye = I(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_candlestick: qe } = mt(), i = Be, B = f(() => !!i.dataset && i.dataset.length), w = y(bt()), Je = y(null), Q = y(!1), Z = y(""), ee = y(void 0), ne = y(0), A = y(null), re = y(null), de = y(null), ve = y(null), ye = y(null), ce = y(null), G = y(0), he = y(0), pe = y(0), e = f({
34
- get: () => me(),
35
- set: (t) => t
36
- }), { userOptionsVisible: te, setUserOptionsVisibility: fe, keepUserOptionState: ge } = Rt({ config: e.value }), { svgRef: xe } = Ot({ config: e.value.style.title });
37
- function me() {
38
- const t = Me({
39
- userConfig: i.config,
40
- defaultConfig: qe
41
- });
42
- let a = {};
43
- return t.theme ? a = {
44
- ...Me({
45
- userConfig: kt.vue_ui_candlestick[t.theme] || i.config,
46
- defaultConfig: t
47
- })
48
- } : a = t, i.config && J(i.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = i.config.style.zoom.startIndex : a.style.zoom.startIndex = null, i.config && J(i.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = i.config.style.zoom.endIndex : a.style.zoom.endIndex = null, i.config && J(i.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = i.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, i.config && J(i.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = i.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
49
- }
50
- Oe(() => i.config, (t) => {
51
- e.value = me(), te.value = !e.value.userOptions.showOnChartHover, be(), G.value += 1, pe.value += 1, he.value += 1, C.value.showTable = e.value.table.show, C.value.showTooltip = e.value.style.tooltip.show;
52
- }, { deep: !0 }), Oe(() => i.dataset, (t) => {
53
- p.value.start = 0, p.value.end = t.length, G.value += 1;
54
- }, { deep: !0 });
55
- const c = y({
56
- height: e.value.style.height,
57
- width: e.value.style.width,
58
- xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
59
- yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
60
- }), z = Ne(null), P = Ne(null);
61
- pt(() => {
62
- be();
63
- });
64
- function be() {
65
- if (wt(i.dataset) && N({
66
- componentName: "VueUiCandlestick",
67
- type: "dataset"
68
- }), e.value.responsive) {
69
- const t = Tt(() => {
70
- const { width: a, height: l } = Lt({
71
- chart: A.value,
72
- title: e.value.style.title.text ? re.value : null,
73
- slicer: ve.value,
74
- legend: de.value,
75
- source: ye.value,
76
- noTitle: ce.value
77
- });
78
- requestAnimationFrame(() => {
79
- c.value.width = a, c.value.height = l, e.value.responsiveProportionalSizing ? (c.value.xAxisFontSize = Ee({
80
- relator: Math.min(a, l),
81
- adjuster: e.value.style.width,
82
- source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
83
- threshold: 6,
84
- fallback: 6
85
- }), c.value.yAxisFontSize = Ee({
86
- relator: Math.min(a, l),
87
- adjuster: e.value.style.width,
88
- source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
89
- threshold: 6,
90
- fallback: 6
91
- })) : (c.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, c.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize);
92
- });
93
- });
94
- z.value && (P.value && z.value.unobserve(P.value), z.value.disconnect()), z.value = new ResizeObserver(t), P.value = A.value.parentNode, z.value.observe(P.value);
95
- }
96
- Se();
97
- }
98
- ft(() => {
99
- z.value && (P.value && z.value.unobserve(P.value), z.value.disconnect());
100
- });
101
- const { isPrinting: ke, isImaging: we, generatePdf: _e, generateImage: Ce } = Ft({
102
- elementId: `vue-ui-candlestick_${w.value}`,
103
- fileName: e.value.style.title.text || "vue-ui-candlestick",
104
- options: e.value.userOptions.print
105
- }), Ke = f(() => e.value.userOptions.show && !e.value.style.title.text), C = y({
106
- showTable: e.value.table.show,
107
- showTooltip: e.value.style.tooltip.show
108
- }), n = f(() => {
109
- const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding;
110
- return {
111
- top: t,
112
- right: c.value.width - a,
113
- left: o,
114
- bottom: c.value.height - l,
115
- width: c.value.width - o - a,
116
- height: c.value.height - t - l
117
- };
118
- }), U = f(() => i.dataset.length), p = y({
119
- start: 0,
120
- end: U.value
121
- }), $e = f(() => i.dataset.map((t, a) => ({
122
- ...t,
123
- absoluteIndex: a
124
- })).slice(p.value.start, p.value.end)), le = f(() => (i.dataset.forEach((t, a) => {
125
- [null, void 0].includes(t[0]) && N({
126
- componentName: "VueUiCandlestick",
127
- type: "datasetAttribute",
128
- property: "period (index 0)",
129
- index: a
130
- }), [null, void 0].includes(t[1]) && N({
131
- componentName: "VueUiCandlestick",
132
- type: "datasetAttribute",
133
- property: "open (index 1)",
134
- index: a
135
- }), [null, void 0].includes(t[2]) && N({
136
- componentName: "VueUiCandlestick",
137
- type: "datasetAttribute",
138
- property: "high (index 2)",
139
- index: a
140
- }), [null, void 0].includes(t[3]) && N({
141
- componentName: "VueUiCandlestick",
142
- type: "datasetAttribute",
143
- property: "low (index 3)",
144
- index: a
145
- }), [null, void 0].includes(t[4]) && N({
146
- componentName: "VueUiCandlestick",
147
- type: "datasetAttribute",
148
- property: "last (index 4)",
149
- index: a
150
- }), [null, void 0].includes(t[5]) && N({
151
- componentName: "VueUiCandlestick",
152
- type: "datasetAttribute",
153
- property: "volume (index 5)",
154
- index: a
155
- });
156
- }), $e.value.map((t) => ({
157
- absoluteIndex: t.absoluteIndex,
158
- period: t[0],
159
- open: t[1],
160
- high: t[2],
161
- low: t[3],
162
- last: t[4],
163
- volume: t[5]
164
- })))), d = f(() => n.value.width / $e.value.length), Ae = f(() => {
165
- const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...le.value.map((l) => l.high)) : e.value.style.layout.grid.yAxis.scale.max, a = e.value.style.layout.grid.yAxis.scale.min === null ? 0 : e.value.style.layout.grid.yAxis.scale.min;
166
- return {
167
- max: t,
168
- min: a
169
- };
170
- }), _ = f(() => _t(Ae.value.min, Ae.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
171
- function H(t, a) {
172
- return {
173
- ...t,
174
- x: W(n.value.left + a * d.value + d.value / 2),
175
- y: W(n.value.top + (1 - (t - _.value.min) / (_.value.max - _.value.min)) * n.value.height),
176
- value: W(t)
177
- };
178
- }
179
- const b = f(() => le.value.map((t, a) => {
180
- const l = H(t.open, a), o = H(t.high, a), k = H(t.low, a), x = H(t.last, a), S = t.last > t.open;
181
- return {
182
- period: t.period,
183
- open: l,
184
- high: o,
185
- low: k,
186
- last: x,
187
- volume: t.volume,
188
- isBullish: S,
189
- absoluteIndex: t.absoluteIndex
190
- };
191
- }));
192
- function Qe(t) {
193
- return W((t - _.value.min) / (_.value.max - _.value.min));
194
- }
195
- const Ze = f(() => _.value.ticks.map((t) => ({
196
- y: n.value.bottom - n.value.height * Qe(t),
197
- value: W(t)
198
- }))), et = f(() => le.value.map((t) => t.period)), V = f(() => Vt({
199
- values: i.dataset.map((t) => t[0]),
200
- maxDatapoints: i.dataset.length,
201
- formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
202
- start: p.value.start,
203
- end: p.value.end
204
- })), ze = f(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
205
- start: V.value.find((t) => t.absoluteIndex === p.value.start).text,
206
- end: V.value.find((t) => t.absoluteIndex === p.value.end - 1).text
207
- } : {
208
- start: i.dataset[p.value.start] ? i.dataset[p.value.start][0] : i.dataset[0][0],
209
- end: i.dataset[p.value.end - 1] ? i.dataset[p.value.end - 1][0] : i.dataset.at(-1)[0]
210
- }), ae = y(null);
211
- function tt(t, a) {
212
- ee.value = t, ae.value = {
213
- datapoint: a,
214
- seriesIndex: t,
215
- series: b.value,
216
- config: e.value
217
- };
218
- const l = e.value.style.tooltip.customFormat;
219
- if (St(l) && It(() => l({
220
- seriesIndex: t,
221
- datapoint: a,
222
- series: b.value,
223
- config: e.value
224
- })))
225
- Z.value = l({
226
- seriesIndex: t,
227
- datapoint: a,
228
- series: b.value,
229
- config: e.value
230
- });
231
- else if (e.value.style.tooltip.show) {
232
- let o = "";
233
- const { period: k, open: x, high: S, low: se, last: ue, volume: Y, isBullish: Re } = b.value[t], { period: kl, open: st, high: ut, low: it, last: nt, volume: rt } = e.value.translations, dt = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? V.value[t].text : k;
234
- 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}"
235
- fill="${e.value.style.layout.candle.gradient.show ? Re ? `url(#bullish_gradient_${w.value})` : `url(#bearish_gradient_${w.value})` : Re ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${dt}</div>`, o += `${rt} : <b>${isNaN(Y) ? "-" : Number(Y.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}">`;
236
- const vt = $({
237
- p: e.value.style.tooltip.prefix,
238
- v: x.value,
239
- s: e.value.style.tooltip.suffix,
240
- r: e.value.style.tooltip.roundingValue
241
- });
242
- o += `<div>${st}: <b>${vt}</b></div>`;
243
- const yt = $({
244
- p: e.value.style.tooltip.prefix,
245
- v: S.value,
246
- s: e.value.style.tooltip.suffix,
247
- r: e.value.style.tooltip.roundingValue
248
- });
249
- o += `<div>${ut}: <b>${yt}</b></div>`;
250
- const ct = $({
251
- p: e.value.style.tooltip.prefix,
252
- v: se.value,
253
- s: e.value.style.tooltip.suffix,
254
- r: e.value.style.tooltip.roundingValue
255
- });
256
- o += `<div>${it}: <b>${ct}</b></div>`;
257
- const ht = $({
258
- p: e.value.style.tooltip.prefix,
259
- v: ue.value,
260
- s: e.value.style.tooltip.suffix,
261
- r: e.value.style.tooltip.roundingValue
262
- });
263
- o += `<div>${nt}: <b>${ht}</b></div>`, o += "</div>", Z.value = `<div style="text-align:right">${o}</div>`;
264
- }
265
- Q.value = !0;
266
- }
267
- function lt() {
268
- Se();
269
- }
270
- const E = y(null);
271
- async function Se() {
272
- (e.value.style.zoom.startIndex !== null || e.value.style.zoom.endIndex !== null) && E.value ? (e.value.style.zoom.startIndex !== null && (await D(), await D(), E.value && E.value.setStartValue(e.value.style.zoom.startIndex)), e.value.style.zoom.endIndex !== null && (await D(), await D(), E.value && E.value.setEndValue(at(e.value.style.zoom.endIndex + 1)))) : (p.value = {
273
- start: 0,
274
- end: U.value
275
- }, G.value += 1);
276
- }
277
- function at(t) {
278
- const a = U.value;
279
- 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;
280
- }
281
- function Ie(t = null) {
282
- D(() => {
283
- 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 = b.value.map((x, S) => [
284
- e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? V.value[S].text : x.period,
285
- x.open.value,
286
- x.high.value,
287
- x.low.value,
288
- x.last.value,
289
- x.volume
290
- ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), k = At(o);
291
- t ? t(k) : zt({ csvContent: k, title: e.value.style.title.text || "vue-ui-candlestick" });
292
- });
293
- }
294
- const j = f(() => {
295
- const t = b.value.map((o, k) => {
296
- const x = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? V.value[k].text : o.period, S = $({
297
- p: e.value.table.td.prefix,
298
- v: o.open.value,
299
- s: e.value.table.td.suffix,
300
- r: e.value.table.td.roundingValue
301
- }), se = $({
302
- p: e.value.table.td.prefix,
303
- v: o.high.value,
304
- s: e.value.table.td.suffix,
305
- r: e.value.table.td.roundingValue
306
- }), ue = $({
307
- p: e.value.table.td.prefix,
308
- v: o.low.value,
309
- s: e.value.table.td.suffix,
310
- r: e.value.table.td.roundingValue
311
- }), Y = $({
312
- p: e.value.table.td.prefix,
313
- v: o.last.value,
314
- s: e.value.table.td.suffix,
315
- r: e.value.table.td.roundingValue
316
- });
317
- return [
318
- `<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> ${x}`,
319
- S,
320
- se,
321
- ue,
322
- Y,
323
- `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
324
- ];
325
- }), a = {
326
- th: {
327
- backgroundColor: e.value.table.th.backgroundColor,
328
- color: e.value.table.th.color,
329
- outline: e.value.table.th.outline
330
- },
331
- td: {
332
- backgroundColor: e.value.table.td.backgroundColor,
333
- color: e.value.table.td.color,
334
- outline: e.value.table.td.outline
335
- },
336
- breakpoint: e.value.table.responsiveBreakpoint
337
- }, l = [
338
- e.value.translations.period,
339
- e.value.translations.open,
340
- e.value.translations.high,
341
- e.value.translations.low,
342
- e.value.translations.last,
343
- e.value.translations.volume
344
- ];
345
- return { head: l, body: t, config: a, colNames: l };
346
- }), M = y(!1);
347
- function Te(t) {
348
- M.value = t, ne.value += 1;
349
- }
350
- function Le() {
351
- C.value.showTable = !C.value.showTable;
352
- }
353
- function Fe() {
354
- C.value.showTooltip = !C.value.showTooltip;
355
- }
356
- const X = y(!1);
357
- function oe() {
358
- X.value = !X.value;
359
- }
360
- async function ot({ scale: t = 2 } = {}) {
361
- if (!A.value) return;
362
- const { width: a, height: l } = A.value.getBoundingClientRect(), o = a / l, { imageUri: k, base64: x } = await Et({ domElement: A.value, base64: !0, img: !0, scale: t });
363
- return {
364
- imageUri: k,
365
- base64: x,
366
- title: e.value.style.title.text,
367
- width: a,
368
- height: l,
369
- aspectRatio: o
370
- };
371
- }
372
- return Ue({
373
- getImage: ot,
374
- generatePdf: _e,
375
- generateCsv: Ie,
376
- generateImage: Ce,
377
- toggleTable: Le,
378
- toggleTooltip: Fe,
379
- toggleAnnotator: oe,
380
- toggleFullscreen: Te
381
- }), (t, a) => (s(), u("div", {
382
- ref_key: "candlestickChart",
383
- ref: A,
384
- class: Pe(`vue-ui-candlestick ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
385
- style: ie(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
386
- id: `vue-ui-candlestick_${w.value}`,
387
- onMouseenter: a[4] || (a[4] = () => r(fe)(!0)),
388
- onMouseleave: a[5] || (a[5] = () => r(fe)(!1))
389
- }, [
390
- e.value.userOptions.buttons.annotator ? (s(), T(r(He), {
391
- key: 0,
392
- svgRef: r(xe),
393
- backgroundColor: e.value.style.backgroundColor,
394
- color: e.value.style.color,
395
- active: X.value,
396
- onClose: oe
397
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
398
- Ke.value ? (s(), u("div", {
399
- key: 1,
400
- ref_key: "noTitle",
401
- ref: ce,
402
- class: "vue-data-ui-no-title-space",
403
- style: "height:36px; width: 100%;background:transparent"
404
- }, null, 512)) : h("", !0),
405
- e.value.style.title.text ? (s(), u("div", {
406
- key: 2,
407
- ref_key: "chartTitle",
408
- ref: re,
409
- style: "width:100%;background:transparent"
410
- }, [
411
- (s(), T(Nt, {
412
- key: `title_${pe.value}`,
413
- config: {
414
- title: {
415
- cy: "candlestick-div-title",
416
- ...e.value.style.title
417
- },
418
- subtitle: {
419
- cy: "candlestick-div-subtitle",
420
- ...e.value.style.title.subtitle
421
- }
422
- }
423
- }, null, 8, ["config"]))
424
- ], 512)) : h("", !0),
425
- e.value.userOptions.show && B.value && (r(ge) || r(te)) ? (s(), T(r(Ye), {
426
- ref_key: "details",
427
- ref: Je,
428
- key: `user_options_${ne.value}`,
429
- backgroundColor: e.value.style.backgroundColor,
430
- color: e.value.style.color,
431
- isImaging: r(we),
432
- isPrinting: r(ke),
433
- uid: w.value,
434
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
435
- hasPdf: e.value.userOptions.buttons.pdf,
436
- hasImg: e.value.userOptions.buttons.img,
437
- hasXls: e.value.userOptions.buttons.csv,
438
- hasTable: e.value.userOptions.buttons.table,
439
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
440
- isFullscreen: M.value,
441
- isTooltip: C.value.showTooltip,
442
- titles: { ...e.value.userOptions.buttonTitles },
443
- chartElement: A.value,
444
- position: e.value.userOptions.position,
445
- hasAnnotator: e.value.userOptions.buttons.annotator,
446
- isAnnotation: X.value,
447
- callbacks: e.value.userOptions.callbacks,
448
- printScale: e.value.userOptions.print.scale,
449
- onToggleFullscreen: Te,
450
- onGeneratePdf: r(_e),
451
- onGenerateCsv: Ie,
452
- onGenerateImage: r(Ce),
453
- onToggleTable: Le,
454
- onToggleTooltip: Fe,
455
- onToggleAnnotator: oe,
456
- style: ie({
457
- visibility: r(ge) ? r(te) ? "visible" : "hidden" : "visible"
458
- })
459
- }, gt({ _: 2 }, [
460
- t.$slots.menuIcon ? {
461
- name: "menuIcon",
462
- fn: m(({ isOpen: l, color: o }) => [
463
- g(t.$slots, "menuIcon", L(F({ isOpen: l, color: o })), void 0, !0)
464
- ]),
465
- key: "0"
466
- } : void 0,
467
- t.$slots.optionTooltip ? {
468
- name: "optionTooltip",
469
- fn: m(() => [
470
- g(t.$slots, "optionTooltip", {}, void 0, !0)
471
- ]),
472
- key: "1"
473
- } : void 0,
474
- t.$slots.optionPdf ? {
475
- name: "optionPdf",
476
- fn: m(() => [
477
- g(t.$slots, "optionPdf", {}, void 0, !0)
478
- ]),
479
- key: "2"
480
- } : void 0,
481
- t.$slots.optionCsv ? {
482
- name: "optionCsv",
483
- fn: m(() => [
484
- g(t.$slots, "optionCsv", {}, void 0, !0)
485
- ]),
486
- key: "3"
487
- } : void 0,
488
- t.$slots.optionImg ? {
489
- name: "optionImg",
490
- fn: m(() => [
491
- g(t.$slots, "optionImg", {}, void 0, !0)
492
- ]),
493
- key: "4"
494
- } : void 0,
495
- t.$slots.optionTable ? {
496
- name: "optionTable",
497
- fn: m(() => [
498
- g(t.$slots, "optionTable", {}, void 0, !0)
499
- ]),
500
- key: "5"
501
- } : void 0,
502
- t.$slots.optionFullscreen ? {
503
- name: "optionFullscreen",
504
- fn: m(({ toggleFullscreen: l, isFullscreen: o }) => [
505
- g(t.$slots, "optionFullscreen", L(F({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
506
- ]),
507
- key: "6"
508
- } : void 0,
509
- t.$slots.optionAnnotator ? {
510
- name: "optionAnnotator",
511
- fn: m(({ toggleAnnotator: l, isAnnotator: o }) => [
512
- g(t.$slots, "optionAnnotator", L(F({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
513
- ]),
514
- key: "7"
515
- } : void 0
516
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
517
- B.value ? (s(), u("svg", {
518
- key: 4,
519
- ref_key: "svgRef",
520
- ref: xe,
521
- xmlns: r(Ct),
522
- "aria-label": e.value.style.title.text || "candlestick chart",
523
- class: Pe({ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }),
524
- viewBox: `0 0 ${c.value.width <= 0 ? 10 : c.value.width} ${c.value.height <= 0 ? 10 : c.value.height}`,
525
- style: ie(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
526
- }, [
527
- Ve(r(Ge)),
528
- t.$slots["chart-background"] ? (s(), u("foreignObject", {
529
- key: 0,
530
- x: n.value.left,
531
- y: n.value.top,
532
- width: Math.max(0.1, n.value.width),
533
- height: Math.max(0.1, n.value.height),
534
- style: {
535
- pointerEvents: "none"
536
- }
537
- }, [
538
- g(t.$slots, "chart-background", {}, void 0, !0)
539
- ], 8, Dt)) : h("", !0),
540
- b.value.length > 0 ? (s(), u("g", Wt, [
541
- v("defs", null, [
542
- v("linearGradient", {
543
- id: `bearish_gradient_${w.value}`,
544
- x2: "0%",
545
- y2: "100%"
546
- }, [
547
- v("stop", {
548
- offset: "0%",
549
- "stop-color": e.value.style.layout.candle.colors.bearish
550
- }, null, 8, Ht),
551
- v("stop", {
552
- offset: "50%",
553
- "stop-color": `${r(K)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
554
- }, null, 8, jt),
555
- v("stop", {
556
- offset: "100%",
557
- "stop-color": `${r(K)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
558
- }, null, 8, Xt)
559
- ], 8, Gt),
560
- v("linearGradient", {
561
- id: `bullish_gradient_${w.value}`,
562
- x2: "0%",
563
- y2: "100%"
564
- }, [
565
- v("stop", {
566
- offset: "0%",
567
- "stop-color": e.value.style.layout.candle.colors.bullish
568
- }, null, 8, qt),
569
- v("stop", {
570
- offset: "50%",
571
- "stop-color": `${r(K)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
572
- }, null, 8, Jt),
573
- v("stop", {
574
- offset: "100%",
575
- "stop-color": `${r(K)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
576
- }, null, 8, Kt)
577
- ], 8, Yt)
578
- ]),
579
- e.value.style.layout.grid.show ? (s(), u("g", Qt, [
580
- v("line", {
581
- x1: n.value.left,
582
- x2: n.value.left,
583
- y1: n.value.top,
584
- y2: n.value.bottom,
585
- stroke: e.value.style.layout.grid.stroke,
586
- "stroke-width": e.value.style.layout.grid.strokeWidth,
587
- "stroke-linecap": "round"
588
- }, null, 8, Zt),
589
- v("line", {
590
- x1: n.value.left,
591
- x2: n.value.right,
592
- y1: n.value.bottom,
593
- y2: n.value.bottom,
594
- stroke: e.value.style.layout.grid.stroke,
595
- "stroke-width": e.value.style.layout.grid.strokeWidth,
596
- "stroke-linecap": "round"
597
- }, null, 8, el)
598
- ])) : h("", !0),
599
- e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g", tl, [
600
- (s(!0), u(R, null, O(Ze.value, (l, o) => (s(), u("g", null, [
601
- l.value >= _.value.min && l.value <= _.value.max ? (s(), u("line", {
602
- key: 0,
603
- x1: n.value.left,
604
- x2: n.value.left - 5,
605
- y1: l.y,
606
- y2: l.y,
607
- stroke: e.value.style.layout.grid.stroke,
608
- "stroke-width": e.value.style.layout.grid.strokeWidth,
609
- "stroke-linecap": "round"
610
- }, null, 8, ll)) : h("", !0),
611
- l.value >= _.value.min && l.value <= _.value.max ? (s(), u("text", {
612
- key: 1,
613
- x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
614
- y: l.y + c.value.yAxisFontSize / 3,
615
- "font-size": c.value.yAxisFontSize,
616
- "text-anchor": "end",
617
- fill: e.value.style.layout.grid.yAxis.dataLabels.color,
618
- "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
619
- }, q(r($)({
620
- p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
621
- v: l.value,
622
- s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
623
- r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
624
- })), 9, al)) : h("", !0)
625
- ]))), 256))
626
- ])) : h("", !0),
627
- e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", ol, [
628
- (s(!0), u(R, null, O(et.value, (l, o) => (s(), u("g", null, [
629
- v("text", {
630
- transform: `translate(${n.value.left + d.value * o + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
631
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
632
- "font-size": c.value.xAxisFontSize,
633
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
634
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
635
- }, q(l), 9, sl)
636
- ]))), 256))
637
- ])) : h("", !0),
638
- e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", ul, [
639
- (s(!0), u(R, null, O(V.value, (l, o) => (s(), u("g", null, [
640
- v("text", {
641
- transform: `translate(${n.value.left + d.value * o + d.value / 2}, ${n.value.bottom + c.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
642
- "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
643
- "font-size": c.value.xAxisFontSize,
644
- fill: e.value.style.layout.grid.xAxis.dataLabels.color,
645
- "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
646
- }, q(l.text), 9, il)
647
- ]))), 256))
648
- ])) : h("", !0),
649
- v("g", null, [
650
- (s(!0), u(R, null, O(b.value, (l, o) => (s(), u("g", null, [
651
- v("line", {
652
- x1: l.open.x,
653
- x2: l.open.x,
654
- y1: l.high.y,
655
- y2: l.low.y,
656
- stroke: e.value.style.layout.wick.stroke,
657
- "stroke-width": e.value.style.layout.wick.strokeWidth,
658
- "stroke-linecap": "round"
659
- }, null, 8, nl),
660
- e.value.style.layout.wick.extremity.shape === "circle" ? (s(), u("g", rl, [
661
- v("circle", {
662
- cx: l.high.x,
663
- cy: l.high.y,
664
- r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
665
- fill: e.value.style.layout.wick.extremity.color
666
- }, null, 8, dl),
667
- v("circle", {
668
- cx: l.low.x,
669
- cy: l.low.y,
670
- r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
671
- fill: e.value.style.layout.wick.extremity.color
672
- }, null, 8, vl)
673
- ])) : h("", !0),
674
- e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g", yl, [
675
- v("line", {
676
- x1: l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
677
- x2: l.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
678
- y1: l.high.y,
679
- y2: l.high.y,
680
- stroke: e.value.style.layout.wick.extremity.color,
681
- "stroke-width": e.value.style.layout.wick.strokeWidth,
682
- "stroke-linecap": "round"
683
- }, null, 8, cl),
684
- v("line", {
685
- x1: l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
686
- x2: l.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
687
- y1: l.low.y,
688
- y2: l.low.y,
689
- stroke: e.value.style.layout.wick.extremity.color,
690
- "stroke-width": e.value.style.layout.wick.strokeWidth,
691
- "stroke-linecap": "round"
692
- }, null, 8, hl)
693
- ])) : h("", !0)
694
- ]))), 256))
695
- ]),
696
- v("g", null, [
697
- (s(!0), u(R, null, O(b.value, (l, o) => (s(), u("rect", {
698
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
699
- y: l.isBullish ? l.last.y : l.open.y,
700
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
701
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
702
- fill: e.value.style.layout.candle.gradient.underlayer,
703
- rx: e.value.style.layout.candle.borderRadius,
704
- stroke: "none"
705
- }, null, 8, pl))), 256)),
706
- (s(!0), u(R, null, O(b.value, (l, o) => (s(), u("rect", {
707
- x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
708
- y: l.isBullish ? l.last.y : l.open.y,
709
- height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
710
- width: d.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : d.value * e.value.style.layout.candle.widthRatio,
711
- 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,
712
- rx: e.value.style.layout.candle.borderRadius,
713
- stroke: e.value.style.layout.candle.stroke,
714
- "stroke-width": e.value.style.layout.candle.strokeWidth,
715
- "stroke-linecap": "round",
716
- "stroke-linejoin": "round"
717
- }, null, 8, fl))), 256))
718
- ]),
719
- v("g", null, [
720
- (s(!0), u(R, null, O(b.value, (l, o) => (s(), u("rect", {
721
- x: n.value.left + o * d.value,
722
- y: n.value.top,
723
- height: n.value.height <= 0 ? 1e-4 : n.value.height,
724
- width: d.value <= 0 ? 1e-4 : d.value,
725
- fill: ee.value === o ? r($t)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
726
- onMouseover: (k) => tt(o, l),
727
- onMouseleave: a[0] || (a[0] = (k) => {
728
- ee.value = void 0, Q.value = !1;
729
- })
730
- }, null, 40, gl))), 256))
731
- ])
732
- ])) : h("", !0),
733
- g(t.$slots, "svg", { svg: c.value }, void 0, !0)
734
- ], 14, Ut)) : h("", !0),
735
- t.$slots.watermark ? (s(), u("div", xl, [
736
- g(t.$slots, "watermark", L(F({ isPrinting: r(ke) || r(we) })), void 0, !0)
737
- ])) : h("", !0),
738
- B.value ? h("", !0) : (s(), T(r(je), {
739
- key: 6,
740
- config: {
741
- type: "candlesticks",
742
- style: {
743
- backgroundColor: e.value.style.backgroundColor,
744
- candlesticks: {
745
- axis: {
746
- color: "#CCCCCC"
747
- },
748
- candle: {
749
- color: "#CCCCCC"
750
- }
751
- }
752
- }
753
- }
754
- }, null, 8, ["config"])),
755
- e.value.style.zoom.show && B.value ? (s(), u("div", {
756
- key: 7,
757
- ref_key: "chartSlicer",
758
- ref: ve
759
- }, [
760
- (s(), T(Pt, {
761
- ref_key: "slicerComponent",
762
- ref: E,
763
- key: `slicer_${G.value}`,
764
- background: e.value.style.zoom.color,
765
- borderColor: e.value.style.backgroundColor,
766
- fontSize: e.value.style.zoom.fontSize,
767
- useResetSlot: e.value.style.zoom.useResetSlot,
768
- labelLeft: ze.value.start,
769
- labelRight: ze.value.end,
770
- textColor: e.value.style.color,
771
- inputColor: e.value.style.zoom.color,
772
- selectColor: e.value.style.zoom.highlightColor,
773
- max: U.value,
774
- min: 0,
775
- valueStart: p.value.start,
776
- valueEnd: p.value.end,
777
- start: p.value.start,
778
- "onUpdate:start": a[1] || (a[1] = (l) => p.value.start = l),
779
- end: p.value.end,
780
- "onUpdate:end": a[2] || (a[2] = (l) => p.value.end = l),
781
- refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
782
- refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : U.value,
783
- enableRangeHandles: e.value.style.zoom.enableRangeHandles,
784
- enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
785
- onReset: lt
786
- }, {
787
- "reset-action": m(({ reset: l }) => [
788
- g(t.$slots, "reset-action", L(F({ reset: l })), void 0, !0)
789
- ]),
790
- _: 3
791
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
792
- ], 512)) : h("", !0),
793
- v("div", {
794
- ref_key: "chartLegend",
795
- ref: de
796
- }, [
797
- g(t.$slots, "legend", { legend: b.value }, void 0, !0)
798
- ], 512),
799
- t.$slots.source ? (s(), u("div", {
800
- key: 8,
801
- ref_key: "source",
802
- ref: ye,
803
- dir: "auto"
804
- }, [
805
- g(t.$slots, "source", {}, void 0, !0)
806
- ], 512)) : h("", !0),
807
- Ve(r(Xe), {
808
- show: C.value.showTooltip && Q.value,
809
- backgroundColor: e.value.style.tooltip.backgroundColor,
810
- color: e.value.style.tooltip.color,
811
- borderRadius: e.value.style.tooltip.borderRadius,
812
- borderColor: e.value.style.tooltip.borderColor,
813
- borderWidth: e.value.style.tooltip.borderWidth,
814
- fontSize: e.value.style.tooltip.fontSize,
815
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
816
- position: e.value.style.tooltip.position,
817
- offsetY: e.value.style.tooltip.offsetY,
818
- parent: A.value,
819
- content: Z.value,
820
- isFullscreen: M.value,
821
- isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
822
- }, {
823
- "tooltip-before": m(() => [
824
- g(t.$slots, "tooltip-before", L(F({ ...ae.value })), void 0, !0)
825
- ]),
826
- "tooltip-after": m(() => [
827
- g(t.$slots, "tooltip-after", L(F({ ...ae.value })), void 0, !0)
828
- ]),
829
- _: 3
830
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
831
- B.value ? (s(), T(r(De), {
832
- key: 9,
833
- hideDetails: "",
834
- config: {
835
- open: C.value.showTable,
836
- maxHeight: 1e4,
837
- body: {
838
- backgroundColor: e.value.style.backgroundColor,
839
- color: e.value.style.color
840
- },
841
- head: {
842
- backgroundColor: e.value.style.backgroundColor,
843
- color: e.value.style.color
844
- }
845
- }
846
- }, {
847
- content: m(() => [
848
- (s(), T(r(We), {
849
- key: `table_${he.value}`,
850
- colNames: j.value.colNames,
851
- head: j.value.head,
852
- body: j.value.body,
853
- config: j.value.config,
854
- title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
855
- onClose: a[3] || (a[3] = (l) => C.value.showTable = !1)
856
- }, {
857
- th: m(({ th: l }) => [
858
- xt(q(l), 1)
859
- ]),
860
- td: m(({ td: l }) => [
861
- v("div", { innerHTML: l }, null, 8, ml)
862
- ]),
863
- _: 1
864
- }, 8, ["colNames", "head", "body", "config", "title"]))
865
- ]),
866
- _: 1
867
- }, 8, ["config"])) : h("", !0)
868
- ], 46, Bt));
869
- }
870
- }, Ol = /* @__PURE__ */ Mt(bl, [["__scopeId", "data-v-57696154"]]);
871
- export {
872
- Ol as default
873
- };