vue-data-ui 2.3.2 → 2.3.4
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.
- package/dist/Arrow-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-C6KVJkgd.cjs +0 -843
- package/dist/index-bDBuMYfe.js +0 -57303
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import { computed as h, ref as v, onMounted as Ae, onBeforeUnmount as Fe, openBlock as u, createElementBlock as s, normalizeClass as ve, normalizeStyle as H, createVNode as q, createCommentVNode as y, createBlock as O, unref as x, createSlots as Le, withCtx as f, renderSlot as m, normalizeProps as P, guardReactiveProps as M, createElementVNode as n, Fragment as N, renderList as S, toDisplayString as F, createTextVNode as Re, nextTick as Ve } from "vue";
|
|
2
|
+
import { u as Ie, c as Be, t as Oe, o as Pe, e as C, z as Me, X as Ue, s as U, A as Ee, r as We, v as De, w as Ge, n as Xe, q as je, B as ye } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as He, u as qe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Ye } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as Je, U as Ke } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { _ as Qe } from "./Tooltip-C3phqKuU.js";
|
|
7
|
+
import { D as Ze } from "./DataTable-CwaOlAsy.js";
|
|
8
|
+
import et from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
9
|
+
import { S as tt } from "./Slicer-Bxg5niHl.js";
|
|
10
|
+
import lt from "./vue-ui-accordion-HJPf7My0.js";
|
|
11
|
+
import { u as ce } from "./useNestedProp-BgWkUab_.js";
|
|
12
|
+
import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const at = ["id"], ut = ["xmlns", "viewBox"], st = { key: 0 }, it = ["id"], nt = ["stop-color"], rt = ["stop-color"], dt = ["stop-color"], vt = ["id"], yt = ["stop-color"], ct = ["stop-color"], ht = ["stop-color"], pt = { key: 0 }, gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bt = { key: 1 }, xt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "font-size", "fill", "font-weight"], kt = { key: 2 }, wt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = { key: 0 }, Ct = ["cx", "cy", "r", "fill"], Nt = ["cx", "cy", "r", "fill"], St = { key: 1 }, zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = ["x", "y", "height", "width", "fill", "rx"], Ft = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Lt = ["x", "y", "height", "width", "fill", "onMouseover"], Rt = ["innerHTML"], Vt = {
|
|
14
|
+
__name: "vue-ui-candlestick",
|
|
15
|
+
props: {
|
|
16
|
+
config: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default() {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dataset: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup($, { expose: he }) {
|
|
30
|
+
const k = $, { vue_ui_candlestick: pe } = Ie(), z = h(() => !!k.dataset && k.dataset.length), b = v(Be()), ge = v(null), E = v(!1), W = v(""), D = v(void 0), Y = v(0), J = v(0), T = v(null), K = v(null), Q = v(null), Z = v(null), e = h(() => {
|
|
31
|
+
const l = ce({
|
|
32
|
+
userConfig: k.config,
|
|
33
|
+
defaultConfig: pe
|
|
34
|
+
});
|
|
35
|
+
return l.theme ? {
|
|
36
|
+
...ce({
|
|
37
|
+
userConfig: Oe.vue_ui_candlestick[l.theme] || k.config,
|
|
38
|
+
defaultConfig: l
|
|
39
|
+
})
|
|
40
|
+
} : l;
|
|
41
|
+
}), d = v({
|
|
42
|
+
height: e.value.style.height,
|
|
43
|
+
width: e.value.style.width,
|
|
44
|
+
xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
45
|
+
yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
|
|
46
|
+
}), L = v(null);
|
|
47
|
+
Ae(() => {
|
|
48
|
+
if (Pe(k.dataset) && C({
|
|
49
|
+
componentName: "VueUiCandlestick",
|
|
50
|
+
type: "dataset"
|
|
51
|
+
}), e.value.responsive) {
|
|
52
|
+
const l = He(() => {
|
|
53
|
+
const { width: a, height: t } = qe({
|
|
54
|
+
chart: T.value,
|
|
55
|
+
title: e.value.style.title.text ? K.value : null,
|
|
56
|
+
slicer: Z.value,
|
|
57
|
+
legend: Q.value
|
|
58
|
+
});
|
|
59
|
+
d.value.width = a, d.value.height = t, d.value.xAxisFontSize = ye({
|
|
60
|
+
relator: Math.min(a, t),
|
|
61
|
+
adjuster: e.value.style.width,
|
|
62
|
+
source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
63
|
+
threshold: 6,
|
|
64
|
+
fallback: 6
|
|
65
|
+
}), d.value.yAxisFontSize = ye({
|
|
66
|
+
relator: Math.min(a, t),
|
|
67
|
+
adjuster: e.value.style.width,
|
|
68
|
+
source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
|
|
69
|
+
threshold: 6,
|
|
70
|
+
fallback: 6
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
L.value = new ResizeObserver(l), L.value.observe(T.value.parentNode);
|
|
74
|
+
}
|
|
75
|
+
}), Fe(() => {
|
|
76
|
+
L.value && L.value.disconnect();
|
|
77
|
+
});
|
|
78
|
+
const { isPrinting: fe, isImaging: be, generatePdf: ee, generateImage: te } = Je({
|
|
79
|
+
elementId: `vue-ui-candlestick_${b.value}`,
|
|
80
|
+
fileName: e.value.style.title.text || "vue-ui-candlestick"
|
|
81
|
+
}), w = v({
|
|
82
|
+
showTable: e.value.table.show,
|
|
83
|
+
showTooltip: e.value.style.tooltip.show
|
|
84
|
+
}), i = h(() => {
|
|
85
|
+
const { top: l, right: a, bottom: t, left: o } = e.value.style.layout.padding;
|
|
86
|
+
return {
|
|
87
|
+
top: l,
|
|
88
|
+
right: d.value.width - a,
|
|
89
|
+
left: o,
|
|
90
|
+
bottom: d.value.height - t,
|
|
91
|
+
width: d.value.width - o - a,
|
|
92
|
+
height: d.value.height - l - t
|
|
93
|
+
};
|
|
94
|
+
}), G = h(() => k.dataset.length), c = v({
|
|
95
|
+
start: 0,
|
|
96
|
+
end: G.value
|
|
97
|
+
}), le = h(() => k.dataset.slice(c.value.start, c.value.end)), X = h(() => (k.dataset.forEach((l, a) => {
|
|
98
|
+
[null, void 0].includes(l[0]) && C({
|
|
99
|
+
componentName: "VueUiCandlestick",
|
|
100
|
+
type: "datasetAttribute",
|
|
101
|
+
property: "period (index 0)",
|
|
102
|
+
index: a
|
|
103
|
+
}), [null, void 0].includes(l[1]) && C({
|
|
104
|
+
componentName: "VueUiCandlestick",
|
|
105
|
+
type: "datasetAttribute",
|
|
106
|
+
property: "open (index 1)",
|
|
107
|
+
index: a
|
|
108
|
+
}), [null, void 0].includes(l[2]) && C({
|
|
109
|
+
componentName: "VueUiCandlestick",
|
|
110
|
+
type: "datasetAttribute",
|
|
111
|
+
property: "high (index 2)",
|
|
112
|
+
index: a
|
|
113
|
+
}), [null, void 0].includes(l[3]) && C({
|
|
114
|
+
componentName: "VueUiCandlestick",
|
|
115
|
+
type: "datasetAttribute",
|
|
116
|
+
property: "low (index 3)",
|
|
117
|
+
index: a
|
|
118
|
+
}), [null, void 0].includes(l[4]) && C({
|
|
119
|
+
componentName: "VueUiCandlestick",
|
|
120
|
+
type: "datasetAttribute",
|
|
121
|
+
property: "last (index 4)",
|
|
122
|
+
index: a
|
|
123
|
+
}), [null, void 0].includes(l[5]) && C({
|
|
124
|
+
componentName: "VueUiCandlestick",
|
|
125
|
+
type: "datasetAttribute",
|
|
126
|
+
property: "volume (index 5)",
|
|
127
|
+
index: a
|
|
128
|
+
});
|
|
129
|
+
}), le.value.map((l) => ({
|
|
130
|
+
period: l[0],
|
|
131
|
+
open: l[1],
|
|
132
|
+
high: l[2],
|
|
133
|
+
low: l[3],
|
|
134
|
+
last: l[4],
|
|
135
|
+
volume: l[5]
|
|
136
|
+
})))), r = h(() => i.value.width / le.value.length), oe = h(() => ({
|
|
137
|
+
max: Math.max(...X.value.map((l) => l.high)),
|
|
138
|
+
min: 0
|
|
139
|
+
})), _ = h(() => Me(oe.value.min, oe.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
|
|
140
|
+
function R(l, a) {
|
|
141
|
+
return {
|
|
142
|
+
...l,
|
|
143
|
+
x: i.value.left + a * r.value + r.value / 2,
|
|
144
|
+
y: i.value.top + (1 - l / _.value.max) * i.value.height,
|
|
145
|
+
value: l
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const p = h(() => X.value.map((l, a) => {
|
|
149
|
+
const t = R(l.open, a), o = R(l.high, a), g = R(l.low, a), I = R(l.last, a), B = l.last > l.open;
|
|
150
|
+
return {
|
|
151
|
+
period: l.period,
|
|
152
|
+
open: t,
|
|
153
|
+
high: o,
|
|
154
|
+
low: g,
|
|
155
|
+
last: I,
|
|
156
|
+
volume: l.volume,
|
|
157
|
+
isBullish: B
|
|
158
|
+
};
|
|
159
|
+
}));
|
|
160
|
+
function xe(l) {
|
|
161
|
+
return l / _.value.max;
|
|
162
|
+
}
|
|
163
|
+
const me = h(() => _.value.ticks.map((l) => ({
|
|
164
|
+
y: i.value.bottom - i.value.height * xe(l),
|
|
165
|
+
value: l
|
|
166
|
+
}))), ke = h(() => X.value.map((l) => l.period)), j = v(null);
|
|
167
|
+
function we(l, a) {
|
|
168
|
+
D.value = l, j.value = {
|
|
169
|
+
datapoint: a,
|
|
170
|
+
seriesIndex: l,
|
|
171
|
+
series: p.value,
|
|
172
|
+
config: e.value
|
|
173
|
+
};
|
|
174
|
+
const t = e.value.style.tooltip.customFormat;
|
|
175
|
+
if (De(t) && Ge(() => t({
|
|
176
|
+
seriesIndex: l,
|
|
177
|
+
datapoint: a,
|
|
178
|
+
series: p.value,
|
|
179
|
+
config: e.value
|
|
180
|
+
})))
|
|
181
|
+
W.value = t({
|
|
182
|
+
seriesIndex: l,
|
|
183
|
+
datapoint: a,
|
|
184
|
+
series: p.value,
|
|
185
|
+
config: e.value
|
|
186
|
+
});
|
|
187
|
+
else if (e.value.style.tooltip.show) {
|
|
188
|
+
let o = "";
|
|
189
|
+
const { period: g, open: I, high: B, low: ie, last: ne, volume: re, isBullish: de } = p.value[l], { period: It, open: Ce, high: Ne, low: Se, last: ze, volume: Te } = e.value.translations;
|
|
190
|
+
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}"
|
|
191
|
+
fill="${e.value.style.layout.candle.gradient.show ? de ? `url(#bullish_gradient_${b.value})` : `url(#bearish_gradient_${b.value})` : de ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${g}</div>`, o += `${Te} : <b>${isNaN(re) ? "-" : Number(re.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}">`, o += `<div>${Ce}: <b>${e.value.style.tooltip.prefix} ${isNaN(I.value) ? "-" : Number(I.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${Ne}: <b>${e.value.style.tooltip.prefix} ${isNaN(B.value) ? "-" : Number(B.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${Se}: <b>${e.value.style.tooltip.prefix} ${isNaN(ie.value) ? "-" : Number(ie.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${ze}: <b>${e.value.style.tooltip.prefix} ${isNaN(ne.value) ? "-" : Number(ne.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += "</div>", W.value = `<div style="text-align:right">${o}</div>`;
|
|
192
|
+
}
|
|
193
|
+
E.value = !0;
|
|
194
|
+
}
|
|
195
|
+
function $e() {
|
|
196
|
+
c.value = {
|
|
197
|
+
start: 0,
|
|
198
|
+
end: G.value
|
|
199
|
+
}, J.value += 1;
|
|
200
|
+
}
|
|
201
|
+
function ae() {
|
|
202
|
+
Ve(() => {
|
|
203
|
+
const l = [e.value.translations.period, e.value.translations.open, e.value.translations.high, e.value.translations.low, e.value.translations.last, e.value.translations.volume], a = p.value.map((g) => [
|
|
204
|
+
g.period,
|
|
205
|
+
g.open.value,
|
|
206
|
+
g.high.value,
|
|
207
|
+
g.low.value,
|
|
208
|
+
g.last.value,
|
|
209
|
+
g.volume
|
|
210
|
+
]), t = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(a), o = Xe(t);
|
|
211
|
+
je({ csvContent: o, title: e.value.style.title.text || "vue-ui-candlestick" });
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
const V = h(() => {
|
|
215
|
+
const l = p.value.map((o) => [
|
|
216
|
+
`<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_${b.value}` : `url(#bearish_gradient_${b.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${o.period}`,
|
|
217
|
+
`${e.value.table.td.prefix} ${isNaN(o.open.value) ? "-" : Number(o.open.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
|
|
218
|
+
`${e.value.table.td.prefix} ${isNaN(o.high.value) ? "-" : Number(o.high.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
|
|
219
|
+
`${e.value.table.td.prefix} ${isNaN(o.low.value) ? "-" : Number(o.low.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
|
|
220
|
+
`${e.value.table.td.prefix} ${isNaN(o.last.value) ? "-" : Number(o.last.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
|
|
221
|
+
`${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
|
|
222
|
+
]), a = {
|
|
223
|
+
th: {
|
|
224
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
225
|
+
color: e.value.table.th.color,
|
|
226
|
+
outline: e.value.table.th.outline
|
|
227
|
+
},
|
|
228
|
+
td: {
|
|
229
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
230
|
+
color: e.value.table.td.color,
|
|
231
|
+
outline: e.value.table.td.outline
|
|
232
|
+
},
|
|
233
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
234
|
+
}, t = [
|
|
235
|
+
e.value.translations.period,
|
|
236
|
+
e.value.translations.open,
|
|
237
|
+
e.value.translations.high,
|
|
238
|
+
e.value.translations.low,
|
|
239
|
+
e.value.translations.last,
|
|
240
|
+
e.value.translations.volume
|
|
241
|
+
];
|
|
242
|
+
return { head: t, body: l, config: a, colNames: t };
|
|
243
|
+
}), A = v(!1);
|
|
244
|
+
function _e(l) {
|
|
245
|
+
A.value = l, Y.value += 1;
|
|
246
|
+
}
|
|
247
|
+
function ue() {
|
|
248
|
+
w.value.showTable = !w.value.showTable;
|
|
249
|
+
}
|
|
250
|
+
function se() {
|
|
251
|
+
w.value.showTooltip = !w.value.showTooltip;
|
|
252
|
+
}
|
|
253
|
+
return he({
|
|
254
|
+
generatePdf: ee,
|
|
255
|
+
generateCsv: ae,
|
|
256
|
+
generateImage: te,
|
|
257
|
+
toggleTable: ue,
|
|
258
|
+
toggleTooltip: se
|
|
259
|
+
}), (l, a) => (u(), s("div", {
|
|
260
|
+
ref_key: "candlestickChart",
|
|
261
|
+
ref: T,
|
|
262
|
+
class: ve(`vue-ui-candlestick ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
263
|
+
style: H(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
264
|
+
id: `vue-ui-candlestick_${b.value}`
|
|
265
|
+
}, [
|
|
266
|
+
e.value.style.title.text ? (u(), s("div", {
|
|
267
|
+
key: 0,
|
|
268
|
+
ref_key: "chartTitle",
|
|
269
|
+
ref: K,
|
|
270
|
+
style: H(`width:100%;background:${e.value.style.backgroundColor}`)
|
|
271
|
+
}, [
|
|
272
|
+
q(Ye, {
|
|
273
|
+
config: {
|
|
274
|
+
title: {
|
|
275
|
+
cy: "candlestick-div-title",
|
|
276
|
+
...e.value.style.title
|
|
277
|
+
},
|
|
278
|
+
subtitle: {
|
|
279
|
+
cy: "candlestick-div-subtitle",
|
|
280
|
+
...e.value.style.title.subtitle
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}, null, 8, ["config"])
|
|
284
|
+
], 4)) : y("", !0),
|
|
285
|
+
e.value.userOptions.show && z.value ? (u(), O(Ke, {
|
|
286
|
+
ref_key: "details",
|
|
287
|
+
ref: ge,
|
|
288
|
+
key: `user_options_${Y.value}`,
|
|
289
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
290
|
+
color: e.value.style.color,
|
|
291
|
+
isImaging: x(be),
|
|
292
|
+
isPrinting: x(fe),
|
|
293
|
+
uid: b.value,
|
|
294
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
295
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
296
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
297
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
298
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
299
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
300
|
+
isFullscreen: A.value,
|
|
301
|
+
isTooltip: w.value.showTooltip,
|
|
302
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
303
|
+
chartElement: T.value,
|
|
304
|
+
onToggleFullscreen: _e,
|
|
305
|
+
onGeneratePdf: x(ee),
|
|
306
|
+
onGenerateCsv: ae,
|
|
307
|
+
onGenerateImage: x(te),
|
|
308
|
+
onToggleTable: ue,
|
|
309
|
+
onToggleTooltip: se
|
|
310
|
+
}, Le({ _: 2 }, [
|
|
311
|
+
l.$slots.optionTooltip ? {
|
|
312
|
+
name: "optionTooltip",
|
|
313
|
+
fn: f(() => [
|
|
314
|
+
m(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
315
|
+
]),
|
|
316
|
+
key: "0"
|
|
317
|
+
} : void 0,
|
|
318
|
+
l.$slots.optionPdf ? {
|
|
319
|
+
name: "optionPdf",
|
|
320
|
+
fn: f(() => [
|
|
321
|
+
m(l.$slots, "optionPdf", {}, void 0, !0)
|
|
322
|
+
]),
|
|
323
|
+
key: "1"
|
|
324
|
+
} : void 0,
|
|
325
|
+
l.$slots.optionCsv ? {
|
|
326
|
+
name: "optionCsv",
|
|
327
|
+
fn: f(() => [
|
|
328
|
+
m(l.$slots, "optionCsv", {}, void 0, !0)
|
|
329
|
+
]),
|
|
330
|
+
key: "2"
|
|
331
|
+
} : void 0,
|
|
332
|
+
l.$slots.optionImg ? {
|
|
333
|
+
name: "optionImg",
|
|
334
|
+
fn: f(() => [
|
|
335
|
+
m(l.$slots, "optionImg", {}, void 0, !0)
|
|
336
|
+
]),
|
|
337
|
+
key: "3"
|
|
338
|
+
} : void 0,
|
|
339
|
+
l.$slots.optionTable ? {
|
|
340
|
+
name: "optionTable",
|
|
341
|
+
fn: f(() => [
|
|
342
|
+
m(l.$slots, "optionTable", {}, void 0, !0)
|
|
343
|
+
]),
|
|
344
|
+
key: "4"
|
|
345
|
+
} : void 0,
|
|
346
|
+
l.$slots.optionFullscreen ? {
|
|
347
|
+
name: "optionFullscreen",
|
|
348
|
+
fn: f(({ toggleFullscreen: t, isFullscreen: o }) => [
|
|
349
|
+
m(l.$slots, "optionFullscreen", P(M({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
|
|
350
|
+
]),
|
|
351
|
+
key: "5"
|
|
352
|
+
} : void 0
|
|
353
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
|
|
354
|
+
z.value ? (u(), s("svg", {
|
|
355
|
+
key: 2,
|
|
356
|
+
xmlns: x(Ue),
|
|
357
|
+
class: ve({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
358
|
+
viewBox: `0 0 ${d.value.width <= 0 ? 10 : d.value.width} ${d.value.height <= 0 ? 10 : d.value.height}`,
|
|
359
|
+
style: H(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
|
|
360
|
+
}, [
|
|
361
|
+
p.value.length > 0 ? (u(), s("g", st, [
|
|
362
|
+
n("defs", null, [
|
|
363
|
+
n("linearGradient", {
|
|
364
|
+
id: `bearish_gradient_${b.value}`,
|
|
365
|
+
x2: "0%",
|
|
366
|
+
y2: "100%"
|
|
367
|
+
}, [
|
|
368
|
+
n("stop", {
|
|
369
|
+
offset: "0%",
|
|
370
|
+
"stop-color": e.value.style.layout.candle.colors.bearish
|
|
371
|
+
}, null, 8, nt),
|
|
372
|
+
n("stop", {
|
|
373
|
+
offset: "50%",
|
|
374
|
+
"stop-color": `${x(U)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
|
|
375
|
+
}, null, 8, rt),
|
|
376
|
+
n("stop", {
|
|
377
|
+
offset: "100%",
|
|
378
|
+
"stop-color": `${x(U)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
|
|
379
|
+
}, null, 8, dt)
|
|
380
|
+
], 8, it),
|
|
381
|
+
n("linearGradient", {
|
|
382
|
+
id: `bullish_gradient_${b.value}`,
|
|
383
|
+
x2: "0%",
|
|
384
|
+
y2: "100%"
|
|
385
|
+
}, [
|
|
386
|
+
n("stop", {
|
|
387
|
+
offset: "0%",
|
|
388
|
+
"stop-color": e.value.style.layout.candle.colors.bullish
|
|
389
|
+
}, null, 8, yt),
|
|
390
|
+
n("stop", {
|
|
391
|
+
offset: "50%",
|
|
392
|
+
"stop-color": `${x(U)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
|
|
393
|
+
}, null, 8, ct),
|
|
394
|
+
n("stop", {
|
|
395
|
+
offset: "100%",
|
|
396
|
+
"stop-color": `${x(U)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
|
|
397
|
+
}, null, 8, ht)
|
|
398
|
+
], 8, vt)
|
|
399
|
+
]),
|
|
400
|
+
e.value.style.layout.grid.show ? (u(), s("g", pt, [
|
|
401
|
+
n("line", {
|
|
402
|
+
x1: i.value.left,
|
|
403
|
+
x2: i.value.left,
|
|
404
|
+
y1: i.value.top,
|
|
405
|
+
y2: i.value.bottom,
|
|
406
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
407
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
408
|
+
"stroke-linecap": "round"
|
|
409
|
+
}, null, 8, gt),
|
|
410
|
+
n("line", {
|
|
411
|
+
x1: i.value.left,
|
|
412
|
+
x2: i.value.right,
|
|
413
|
+
y1: i.value.bottom,
|
|
414
|
+
y2: i.value.bottom,
|
|
415
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
416
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
417
|
+
"stroke-linecap": "round"
|
|
418
|
+
}, null, 8, ft)
|
|
419
|
+
])) : y("", !0),
|
|
420
|
+
e.value.style.layout.grid.yAxis.dataLabels.show ? (u(), s("g", bt, [
|
|
421
|
+
(u(!0), s(N, null, S(me.value, (t, o) => (u(), s("g", null, [
|
|
422
|
+
t.value >= _.value.min && t.value <= _.value.max ? (u(), s("line", {
|
|
423
|
+
key: 0,
|
|
424
|
+
x1: i.value.left,
|
|
425
|
+
x2: i.value.left - 5,
|
|
426
|
+
y1: t.y,
|
|
427
|
+
y2: t.y,
|
|
428
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
429
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
430
|
+
"stroke-linecap": "round"
|
|
431
|
+
}, null, 8, xt)) : y("", !0),
|
|
432
|
+
t.value >= _.value.min && t.value <= _.value.max ? (u(), s("text", {
|
|
433
|
+
key: 1,
|
|
434
|
+
x: i.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
|
|
435
|
+
y: t.y + d.value.yAxisFontSize / 3,
|
|
436
|
+
"font-size": d.value.yAxisFontSize,
|
|
437
|
+
"text-anchor": "end",
|
|
438
|
+
fill: e.value.style.layout.grid.yAxis.dataLabels.color,
|
|
439
|
+
"font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
440
|
+
}, F(e.value.style.layout.grid.yAxis.dataLabels.prefix) + " " + F(x(Ee)(t.value) ? t.value.toFixed(e.value.style.layout.grid.yAxis.dataLabels.roundingValue) : "") + " " + F(e.value.style.layout.grid.yAxis.dataLabels.suffix), 9, mt)) : y("", !0)
|
|
441
|
+
]))), 256))
|
|
442
|
+
])) : y("", !0),
|
|
443
|
+
e.value.style.layout.grid.xAxis.dataLabels.show ? (u(), s("g", kt, [
|
|
444
|
+
(u(!0), s(N, null, S(ke.value, (t, o) => (u(), s("g", null, [
|
|
445
|
+
n("text", {
|
|
446
|
+
transform: `translate(${i.value.left + r.value * o + r.value / 2}, ${i.value.bottom + d.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
447
|
+
"text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
448
|
+
"font-size": d.value.xAxisFontSize,
|
|
449
|
+
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
450
|
+
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
451
|
+
}, F(t), 9, wt)
|
|
452
|
+
]))), 256))
|
|
453
|
+
])) : y("", !0),
|
|
454
|
+
n("g", null, [
|
|
455
|
+
(u(!0), s(N, null, S(p.value, (t, o) => (u(), s("g", null, [
|
|
456
|
+
n("line", {
|
|
457
|
+
x1: t.open.x,
|
|
458
|
+
x2: t.open.x,
|
|
459
|
+
y1: t.high.y,
|
|
460
|
+
y2: t.low.y,
|
|
461
|
+
stroke: e.value.style.layout.wick.stroke,
|
|
462
|
+
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
463
|
+
"stroke-linecap": "round"
|
|
464
|
+
}, null, 8, $t),
|
|
465
|
+
e.value.style.layout.wick.extremity.shape === "circle" ? (u(), s("g", _t, [
|
|
466
|
+
n("circle", {
|
|
467
|
+
cx: t.high.x,
|
|
468
|
+
cy: t.high.y,
|
|
469
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? r.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
470
|
+
fill: e.value.style.layout.wick.extremity.color
|
|
471
|
+
}, null, 8, Ct),
|
|
472
|
+
n("circle", {
|
|
473
|
+
cx: t.low.x,
|
|
474
|
+
cy: t.low.y,
|
|
475
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? r.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
476
|
+
fill: e.value.style.layout.wick.extremity.color
|
|
477
|
+
}, null, 8, Nt)
|
|
478
|
+
])) : y("", !0),
|
|
479
|
+
e.value.style.layout.wick.extremity.shape === "line" ? (u(), s("g", St, [
|
|
480
|
+
n("line", {
|
|
481
|
+
x1: t.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? r.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
482
|
+
x2: t.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? r.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
483
|
+
y1: t.high.y,
|
|
484
|
+
y2: t.high.y,
|
|
485
|
+
stroke: e.value.style.layout.wick.extremity.color,
|
|
486
|
+
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
487
|
+
"stroke-linecap": "round"
|
|
488
|
+
}, null, 8, zt),
|
|
489
|
+
n("line", {
|
|
490
|
+
x1: t.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? r.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
491
|
+
x2: t.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? r.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
492
|
+
y1: t.low.y,
|
|
493
|
+
y2: t.low.y,
|
|
494
|
+
stroke: e.value.style.layout.wick.extremity.color,
|
|
495
|
+
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
496
|
+
"stroke-linecap": "round"
|
|
497
|
+
}, null, 8, Tt)
|
|
498
|
+
])) : y("", !0)
|
|
499
|
+
]))), 256))
|
|
500
|
+
]),
|
|
501
|
+
n("g", null, [
|
|
502
|
+
(u(!0), s(N, null, S(p.value, (t, o) => (u(), s("rect", {
|
|
503
|
+
x: t.open.x - r.value / 2 + r.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
504
|
+
y: t.isBullish ? t.last.y : t.open.y,
|
|
505
|
+
height: Math.abs(t.last.y - t.open.y) <= 0 ? 1e-4 : Math.abs(t.last.y - t.open.y),
|
|
506
|
+
width: r.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : r.value * e.value.style.layout.candle.widthRatio,
|
|
507
|
+
fill: e.value.style.layout.candle.gradient.underlayer,
|
|
508
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
509
|
+
stroke: "none"
|
|
510
|
+
}, null, 8, At))), 256)),
|
|
511
|
+
(u(!0), s(N, null, S(p.value, (t, o) => (u(), s("rect", {
|
|
512
|
+
x: t.open.x - r.value / 2 + r.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
513
|
+
y: t.isBullish ? t.last.y : t.open.y,
|
|
514
|
+
height: Math.abs(t.last.y - t.open.y) <= 0 ? 1e-4 : Math.abs(t.last.y - t.open.y),
|
|
515
|
+
width: r.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : r.value * e.value.style.layout.candle.widthRatio,
|
|
516
|
+
fill: t.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${b.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${b.value})` : e.value.style.layout.candle.colors.bearish,
|
|
517
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
518
|
+
stroke: e.value.style.layout.candle.stroke,
|
|
519
|
+
"stroke-width": e.value.style.layout.candle.strokeWidth,
|
|
520
|
+
"stroke-linecap": "round",
|
|
521
|
+
"stroke-linejoin": "round"
|
|
522
|
+
}, null, 8, Ft))), 256))
|
|
523
|
+
]),
|
|
524
|
+
n("g", null, [
|
|
525
|
+
(u(!0), s(N, null, S(p.value, (t, o) => (u(), s("rect", {
|
|
526
|
+
x: i.value.left + o * r.value,
|
|
527
|
+
y: i.value.top,
|
|
528
|
+
height: i.value.height <= 0 ? 1e-4 : i.value.height,
|
|
529
|
+
width: r.value <= 0 ? 1e-4 : r.value,
|
|
530
|
+
fill: D.value === o ? `${e.value.style.layout.selector.color}${x(We)[e.value.style.layout.selector.opacity]}` : "transparent",
|
|
531
|
+
onMouseover: (g) => we(o, t),
|
|
532
|
+
onMouseleave: a[0] || (a[0] = (g) => {
|
|
533
|
+
D.value = void 0, E.value = !1;
|
|
534
|
+
})
|
|
535
|
+
}, null, 40, Lt))), 256))
|
|
536
|
+
])
|
|
537
|
+
])) : y("", !0),
|
|
538
|
+
m(l.$slots, "svg", { svg: d.value }, void 0, !0)
|
|
539
|
+
], 14, ut)) : y("", !0),
|
|
540
|
+
z.value ? y("", !0) : (u(), O(et, {
|
|
541
|
+
key: 3,
|
|
542
|
+
config: {
|
|
543
|
+
type: "candlesticks",
|
|
544
|
+
style: {
|
|
545
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
546
|
+
candlesticks: {
|
|
547
|
+
axis: {
|
|
548
|
+
color: "#CCCCCC"
|
|
549
|
+
},
|
|
550
|
+
candle: {
|
|
551
|
+
color: "#CCCCCC"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}, null, 8, ["config"])),
|
|
557
|
+
e.value.style.zoom.show && z.value ? (u(), s("div", {
|
|
558
|
+
key: 4,
|
|
559
|
+
ref_key: "chartSlicer",
|
|
560
|
+
ref: Z
|
|
561
|
+
}, [
|
|
562
|
+
(u(), O(tt, {
|
|
563
|
+
key: `slicer_${J.value}`,
|
|
564
|
+
background: e.value.style.zoom.color,
|
|
565
|
+
borderColor: e.value.style.backgroundColor,
|
|
566
|
+
fontSize: e.value.style.zoom.fontSize,
|
|
567
|
+
useResetSlot: e.value.style.zoom.useResetSlot,
|
|
568
|
+
labelLeft: $.dataset[c.value.start] ? $.dataset[c.value.start][0] : $.dataset[0][0],
|
|
569
|
+
labelRight: $.dataset[c.value.end - 1] ? $.dataset[c.value.end - 1][0] : $.dataset.at(-1)[0],
|
|
570
|
+
textColor: e.value.style.color,
|
|
571
|
+
inputColor: e.value.style.zoom.color,
|
|
572
|
+
selectColor: e.value.style.zoom.highlightColor,
|
|
573
|
+
max: G.value,
|
|
574
|
+
min: 0,
|
|
575
|
+
valueStart: c.value.start,
|
|
576
|
+
valueEnd: c.value.end,
|
|
577
|
+
start: c.value.start,
|
|
578
|
+
"onUpdate:start": a[1] || (a[1] = (t) => c.value.start = t),
|
|
579
|
+
end: c.value.end,
|
|
580
|
+
"onUpdate:end": a[2] || (a[2] = (t) => c.value.end = t),
|
|
581
|
+
onReset: $e
|
|
582
|
+
}, {
|
|
583
|
+
"reset-action": f(({ reset: t }) => [
|
|
584
|
+
m(l.$slots, "reset-action", P(M({ reset: t })), void 0, !0)
|
|
585
|
+
]),
|
|
586
|
+
_: 3
|
|
587
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"]))
|
|
588
|
+
], 512)) : y("", !0),
|
|
589
|
+
n("div", {
|
|
590
|
+
ref_key: "chartLegend",
|
|
591
|
+
ref: Q
|
|
592
|
+
}, [
|
|
593
|
+
m(l.$slots, "legend", { legend: p.value }, void 0, !0)
|
|
594
|
+
], 512),
|
|
595
|
+
q(Qe, {
|
|
596
|
+
show: w.value.showTooltip && E.value,
|
|
597
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
598
|
+
color: e.value.style.tooltip.color,
|
|
599
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
600
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
601
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
602
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
603
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
604
|
+
parent: T.value,
|
|
605
|
+
content: W.value,
|
|
606
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
|
|
607
|
+
}, {
|
|
608
|
+
"tooltip-before": f(() => [
|
|
609
|
+
m(l.$slots, "tooltip-before", P(M({ ...j.value })), void 0, !0)
|
|
610
|
+
]),
|
|
611
|
+
"tooltip-after": f(() => [
|
|
612
|
+
m(l.$slots, "tooltip-after", P(M({ ...j.value })), void 0, !0)
|
|
613
|
+
]),
|
|
614
|
+
_: 3
|
|
615
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
616
|
+
z.value ? (u(), O(lt, {
|
|
617
|
+
key: 5,
|
|
618
|
+
hideDetails: "",
|
|
619
|
+
config: {
|
|
620
|
+
open: w.value.showTable,
|
|
621
|
+
maxHeight: 1e4,
|
|
622
|
+
body: {
|
|
623
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
624
|
+
color: e.value.style.color
|
|
625
|
+
},
|
|
626
|
+
head: {
|
|
627
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
628
|
+
color: e.value.style.color
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}, {
|
|
632
|
+
content: f(() => [
|
|
633
|
+
q(Ze, {
|
|
634
|
+
colNames: V.value.colNames,
|
|
635
|
+
head: V.value.head,
|
|
636
|
+
body: V.value.body,
|
|
637
|
+
config: V.value.config,
|
|
638
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
|
|
639
|
+
onClose: a[3] || (a[3] = (t) => w.value.showTable = !1)
|
|
640
|
+
}, {
|
|
641
|
+
th: f(({ th: t }) => [
|
|
642
|
+
Re(F(t), 1)
|
|
643
|
+
]),
|
|
644
|
+
td: f(({ td: t }) => [
|
|
645
|
+
n("div", { innerHTML: t }, null, 8, Rt)
|
|
646
|
+
]),
|
|
647
|
+
_: 1
|
|
648
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
649
|
+
]),
|
|
650
|
+
_: 1
|
|
651
|
+
}, 8, ["config"])) : y("", !0)
|
|
652
|
+
], 14, at));
|
|
653
|
+
}
|
|
654
|
+
}, qt = /* @__PURE__ */ ot(Vt, [["__scopeId", "data-v-0ed64fca"]]);
|
|
655
|
+
export {
|
|
656
|
+
qt as default
|
|
657
|
+
};
|