@wick-charts/vue 0.5.1 → 0.6.1
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/README.md +45 -6
- package/dist/BarSeries.vue.js +26 -20
- package/dist/CandlestickSeries.vue.js +30 -24
- package/dist/ChartContainer.vue.js +125 -72
- package/dist/HeatmapSeries.vue.js +40 -0
- package/dist/HeatmapSeries.vue2.js +4 -0
- package/dist/LineSeries.vue.js +26 -20
- package/dist/PieSeries.vue.js +24 -18
- package/dist/core/dist/animation/animator.js +21 -21
- package/dist/core/dist/animation/config.js +114 -87
- package/dist/core/dist/animation/easing.js +3 -1
- package/dist/core/dist/animation/intro-wave.js +68 -0
- package/dist/core/dist/axis/dom-labels.js +13 -14
- package/dist/core/dist/chart/badge-animator.js +56 -0
- package/dist/core/dist/chart/edge-indicators.js +28 -13
- package/dist/core/dist/chart/last-value.js +18 -17
- package/dist/core/dist/chart/options.js +27 -16
- package/dist/core/dist/chart/y-target.js +13 -12
- package/dist/core/dist/chart.js +868 -441
- package/dist/core/dist/components/annotation-chip.js +28 -0
- package/dist/core/dist/components/crosshair.js +8 -6
- package/dist/core/dist/components/edge-indicator.js +58 -26
- package/dist/core/dist/components/loading-indicator.js +46 -0
- package/dist/core/dist/components/marker.js +49 -31
- package/dist/core/dist/components/reference-line.js +27 -36
- package/dist/core/dist/components/time-region.js +30 -28
- package/dist/core/dist/data/store.js +38 -19
- package/dist/core/dist/data/sync.js +60 -38
- package/dist/core/dist/heatmap-tooltip.js +16 -0
- package/dist/core/dist/interactions/handler.js +86 -46
- package/dist/core/dist/perf/perf-hud.js +5 -5
- package/dist/core/dist/scales/x-scale.js +85 -37
- package/dist/core/dist/scales/y-scale.js +38 -27
- package/dist/core/dist/series/bar-intro.js +18 -0
- package/dist/core/dist/series/bar.js +337 -205
- package/dist/core/dist/series/base-multi-layer.js +224 -96
- package/dist/core/dist/series/candlestick-intro.js +57 -0
- package/dist/core/dist/series/candlestick.js +454 -276
- package/dist/core/dist/series/heatmap.js +387 -0
- package/dist/core/dist/series/line-intro.js +85 -0
- package/dist/core/dist/series/line.js +590 -282
- package/dist/core/dist/series/painters/builtins.js +2 -2
- package/dist/core/dist/series/pie.js +396 -259
- package/dist/core/dist/series/register-builtins.js +8 -7
- package/dist/core/dist/series/types.js +6 -0
- package/dist/core/dist/series/wave-intro.js +26 -0
- package/dist/core/dist/theme/create.js +69 -63
- package/dist/core/dist/theme/themes/mint-breeze.js +2 -2
- package/dist/core/dist/theme/themes/sand-dune.js +2 -2
- package/dist/core/dist/utils/color.js +109 -34
- package/dist/core/dist/utils/deep-equal.js +18 -0
- package/dist/core/dist/utils/time.js +25 -19
- package/dist/index.d.ts +1494 -122
- package/dist/index.js +177 -130
- package/dist/ui/Crosshair.vue.js +20 -21
- package/dist/ui/HeatmapTooltip.vue.js +96 -0
- package/dist/ui/HeatmapTooltip.vue2.js +4 -0
- package/dist/ui/InfoBar.vue.js +46 -47
- package/dist/ui/Legend.vue.js +80 -79
- package/dist/ui/PieLegend.vue.js +5 -5
- package/dist/ui/PieTooltip.vue.js +77 -67
- package/dist/ui/Tooltip.vue.js +60 -60
- package/dist/ui/YAxis.vue.js +2 -2
- package/dist/ui/YLabel.vue.js +94 -61
- package/package.json +2 -2
- package/src/BarSeries.vue +23 -7
- package/src/CandlestickSeries.vue +23 -7
- package/src/ChartContainer.vue +250 -13
- package/src/HeatmapSeries.vue +69 -0
- package/src/LineSeries.vue +23 -7
- package/src/PieSeries.vue +22 -6
- package/src/index.ts +84 -3
- package/src/ui/Crosshair.vue +1 -2
- package/src/ui/HeatmapTooltip.vue +144 -0
- package/src/ui/InfoBar.vue +1 -2
- package/src/ui/Legend.vue +13 -0
- package/src/ui/Marker.vue +1 -1
- package/src/ui/PieTooltip.vue +10 -0
- package/src/ui/ReferenceLine.vue +2 -2
- package/src/ui/TimeRegion.vue +2 -2
- package/src/ui/Tooltip.vue +2 -2
- package/src/ui/YLabel.vue +123 -8
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { defineComponent as H, computed as a, useSlots as
|
|
1
|
+
import { defineComponent as H, computed as a, useSlots as R, ref as x, onMounted as O, onUnmounted as P, watchEffect as B, openBlock as m, createElementBlock as g, Fragment as D, unref as b, normalizeStyle as y, createElementVNode as s, toDisplayString as _, createCommentVNode as I, renderSlot as L } from "vue";
|
|
2
2
|
import { computeTooltipPosition as C } from "../core/dist/tooltip-position.js";
|
|
3
3
|
import { formatCompact as X } from "../core/dist/utils/format.js";
|
|
4
4
|
import { useCrosshairPosition as Y } from "../composables.js";
|
|
5
5
|
import { useChartInstance as M } from "../context.js";
|
|
6
|
-
const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A = { style: { fontWeight: 600 } }, N = { style: { display: "flex", justifyContent: "space-between", gap: "16px" } }, V = { style: { opacity: 0.6 } },
|
|
6
|
+
const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A = { style: { fontWeight: 600 } }, N = { style: { display: "flex", justifyContent: "space-between", gap: "16px" } }, V = { style: { opacity: 0.6 } }, j = { style: { fontWeight: 600 } }, G = ["data-measured"], $ = 160, q = 70, te = /* @__PURE__ */ H({
|
|
7
7
|
__name: "PieTooltip",
|
|
8
8
|
props: {
|
|
9
9
|
seriesId: {},
|
|
10
10
|
format: { type: Function }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const S =
|
|
12
|
+
setup(T) {
|
|
13
|
+
const S = T, k = a(() => S.format ?? X), i = M(), l = Y(i), W = R(), d = a(() => typeof W.default == "function"), c = x(0), w = () => {
|
|
14
14
|
c.value++;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
|
|
16
|
+
O(() => {
|
|
17
|
+
i.on("overlayChange", w);
|
|
18
|
+
}), P(() => {
|
|
19
|
+
i.off("overlayChange", w);
|
|
20
20
|
});
|
|
21
|
-
function E(
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
return
|
|
21
|
+
function E(t, o) {
|
|
22
|
+
if (o !== void 0) return o;
|
|
23
|
+
const f = t.getSeriesIdsByType("pie", { visibleOnly: !0 });
|
|
24
|
+
return f.length > 0 ? f[0] : null;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
!
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
26
|
+
const e = a(() => (c.value, i.getTheme())), z = a(() => (c.value, E(i, S.seriesId))), n = a(() => (l.value, c.value, z.value === null ? null : i.getHoverInfo(z.value))), F = x(null), u = x(null);
|
|
27
|
+
let v = null;
|
|
28
|
+
B((t) => {
|
|
29
|
+
if (!d.value) return;
|
|
30
|
+
const o = F.value;
|
|
31
|
+
!o || typeof ResizeObserver > "u" || (v = new ResizeObserver((f) => {
|
|
32
|
+
const p = f[0]?.contentRect;
|
|
33
|
+
if (!p) return;
|
|
34
34
|
const h = u.value;
|
|
35
|
-
(!h || h.width !==
|
|
36
|
-
}),
|
|
37
|
-
|
|
35
|
+
(!h || h.width !== p.width || h.height !== p.height) && (u.value = { width: p.width, height: p.height });
|
|
36
|
+
}), v.observe(o), t(() => {
|
|
37
|
+
v?.disconnect(), v = null;
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
x:
|
|
47
|
-
y:
|
|
48
|
-
chartWidth:
|
|
49
|
-
chartHeight:
|
|
50
|
-
tooltipWidth:
|
|
51
|
-
tooltipHeight:
|
|
40
|
+
const r = a(() => {
|
|
41
|
+
if (!l.value || !n.value) return null;
|
|
42
|
+
const t = i.getMediaSize();
|
|
43
|
+
if (d.value) {
|
|
44
|
+
const o = u.value;
|
|
45
|
+
return o ? C({
|
|
46
|
+
x: l.value.mediaX,
|
|
47
|
+
y: l.value.mediaY,
|
|
48
|
+
chartWidth: t.width,
|
|
49
|
+
chartHeight: t.height,
|
|
50
|
+
tooltipWidth: o.width,
|
|
51
|
+
tooltipHeight: o.height,
|
|
52
52
|
offsetX: 16,
|
|
53
53
|
offsetY: 16
|
|
54
54
|
}) : { left: 0, top: 0 };
|
|
55
55
|
}
|
|
56
56
|
return C({
|
|
57
|
-
x:
|
|
58
|
-
y:
|
|
59
|
-
chartWidth:
|
|
60
|
-
chartHeight:
|
|
61
|
-
tooltipWidth:
|
|
57
|
+
x: l.value.mediaX,
|
|
58
|
+
y: l.value.mediaY,
|
|
59
|
+
chartWidth: t.width,
|
|
60
|
+
chartHeight: t.height,
|
|
61
|
+
tooltipWidth: $,
|
|
62
62
|
tooltipHeight: q,
|
|
63
63
|
offsetX: 16,
|
|
64
64
|
offsetY: 16
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
return (
|
|
68
|
-
n.value &&
|
|
67
|
+
return (t, o) => (m(), g(D, null, [
|
|
68
|
+
n.value && b(l) && r.value && !d.value ? (m(), g("div", {
|
|
69
69
|
key: 0,
|
|
70
|
-
style:
|
|
70
|
+
style: y({
|
|
71
71
|
position: "absolute",
|
|
72
|
-
left:
|
|
73
|
-
top:
|
|
72
|
+
left: r.value.left + "px",
|
|
73
|
+
top: r.value.top + "px",
|
|
74
74
|
pointerEvents: "none",
|
|
75
|
-
background:
|
|
75
|
+
background: e.value.tooltip.background,
|
|
76
76
|
backdropFilter: "blur(12px)",
|
|
77
77
|
WebkitBackdropFilter: "blur(12px)",
|
|
78
|
-
border: "1px solid " +
|
|
78
|
+
border: "1px solid " + e.value.tooltip.borderColor,
|
|
79
79
|
borderRadius: "8px",
|
|
80
80
|
padding: "10px 14px",
|
|
81
81
|
boxShadow: "0 4px 16px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.06)",
|
|
82
|
-
fontSize:
|
|
83
|
-
fontFamily:
|
|
84
|
-
color:
|
|
82
|
+
fontSize: e.value.typography.fontSize + "px",
|
|
83
|
+
fontFamily: e.value.typography.fontFamily,
|
|
84
|
+
color: e.value.tooltip.textColor,
|
|
85
85
|
zIndex: 10,
|
|
86
86
|
display: "flex",
|
|
87
87
|
flexDirection: "column",
|
|
88
88
|
gap: "6px"
|
|
89
89
|
})
|
|
90
90
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
style:
|
|
91
|
+
s("div", U, [
|
|
92
|
+
s("span", {
|
|
93
|
+
style: y({
|
|
94
94
|
width: "10px",
|
|
95
95
|
height: "10px",
|
|
96
96
|
borderRadius: "50%",
|
|
@@ -98,35 +98,45 @@ const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A =
|
|
|
98
98
|
flexShrink: 0
|
|
99
99
|
})
|
|
100
100
|
}, null, 4),
|
|
101
|
-
|
|
101
|
+
s("span", A, _(n.value.label), 1)
|
|
102
102
|
]),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
s("div", N, [
|
|
104
|
+
s("span", V, _(k.value(n.value.value)), 1),
|
|
105
|
+
s("span", j, _(n.value.percent.toFixed(1)) + "%", 1)
|
|
106
106
|
])
|
|
107
|
-
], 4)) :
|
|
108
|
-
n.value &&
|
|
107
|
+
], 4)) : I("", !0),
|
|
108
|
+
n.value && b(l) && r.value && d.value ? (m(), g("div", {
|
|
109
109
|
key: 1,
|
|
110
110
|
ref_key: "containerRef",
|
|
111
|
-
ref:
|
|
111
|
+
ref: F,
|
|
112
112
|
"data-measured": u.value !== null ? "true" : "false",
|
|
113
|
-
style:
|
|
113
|
+
style: y({
|
|
114
114
|
position: "absolute",
|
|
115
|
-
left:
|
|
116
|
-
top:
|
|
115
|
+
left: r.value.left + "px",
|
|
116
|
+
top: r.value.top + "px",
|
|
117
117
|
pointerEvents: "none",
|
|
118
|
+
background: e.value.tooltip.background,
|
|
119
|
+
backdropFilter: "blur(12px)",
|
|
120
|
+
WebkitBackdropFilter: "blur(12px)",
|
|
121
|
+
border: "1px solid " + e.value.tooltip.borderColor,
|
|
122
|
+
borderRadius: "8px",
|
|
123
|
+
padding: "10px 14px",
|
|
124
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.06)",
|
|
125
|
+
fontFamily: e.value.typography.fontFamily,
|
|
126
|
+
fontSize: e.value.typography.fontSize + "px",
|
|
127
|
+
color: e.value.tooltip.textColor,
|
|
118
128
|
zIndex: 10,
|
|
119
129
|
width: "max-content",
|
|
120
|
-
maxWidth:
|
|
130
|
+
maxWidth: b(i).getMediaSize().width + "px",
|
|
121
131
|
boxSizing: "border-box",
|
|
122
132
|
visibility: u.value !== null ? "visible" : "hidden"
|
|
123
133
|
})
|
|
124
134
|
}, [
|
|
125
|
-
L(
|
|
135
|
+
L(t.$slots, "default", {
|
|
126
136
|
info: n.value,
|
|
127
|
-
format:
|
|
137
|
+
format: k.value
|
|
128
138
|
})
|
|
129
|
-
], 12,
|
|
139
|
+
], 12, G)) : I("", !0)
|
|
130
140
|
], 64));
|
|
131
141
|
}
|
|
132
142
|
});
|
package/dist/ui/Tooltip.vue.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { defineComponent as P, computed as s, ref as w, onMounted as D, onUnmounted as M, useSlots as X, watchEffect as Y, openBlock as r, createElementBlock as u, Fragment as x, unref as
|
|
2
|
-
import { buildHoverSnapshots as
|
|
3
|
-
import { resolveCandlestickBodyColor as
|
|
1
|
+
import { defineComponent as P, computed as s, ref as w, onMounted as D, onUnmounted as M, useSlots as X, watchEffect as Y, openBlock as r, createElementBlock as u, Fragment as x, unref as p, normalizeStyle as m, createElementVNode as d, toDisplayString as f, renderList as H, createCommentVNode as _, renderSlot as Z } from "vue";
|
|
2
|
+
import { buildHoverSnapshots as $ } from "../core/dist/snapshots.js";
|
|
3
|
+
import { resolveCandlestickBodyColor as K } from "../core/dist/theme/resolve.js";
|
|
4
4
|
import { computeTooltipPosition as R } from "../core/dist/tooltip-position.js";
|
|
5
|
-
import { formatCompact as
|
|
6
|
-
import { formatDate as
|
|
7
|
-
import { useCrosshairPosition as
|
|
8
|
-
import { useChartInstance as
|
|
9
|
-
const
|
|
5
|
+
import { formatCompact as U, formatPriceAdaptive as j } from "../core/dist/utils/format.js";
|
|
6
|
+
import { formatDate as q } from "../core/dist/utils/time.js";
|
|
7
|
+
import { useCrosshairPosition as G } from "../composables.js";
|
|
8
|
+
import { useChartInstance as J } from "../context.js";
|
|
9
|
+
const Q = {
|
|
10
10
|
key: 0,
|
|
11
11
|
style: { display: "grid", gridTemplateColumns: "auto 1fr", gap: "4px 12px" }
|
|
12
|
-
},
|
|
12
|
+
}, ee = { style: { opacity: 0.5 } }, te = {
|
|
13
13
|
key: 1,
|
|
14
14
|
style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
|
|
15
|
-
},
|
|
15
|
+
}, oe = { style: { opacity: 0.6, flex: "1" } }, le = ["data-measured"], ce = /* @__PURE__ */ P({
|
|
16
16
|
__name: "Tooltip",
|
|
17
17
|
props: {
|
|
18
18
|
sort: {},
|
|
19
19
|
format: { type: Function }
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const F =
|
|
23
|
-
() => F.format ?? ((
|
|
24
|
-
), o =
|
|
25
|
-
|
|
21
|
+
setup(I) {
|
|
22
|
+
const F = I, A = s(() => F.sort ?? "none"), k = s(
|
|
23
|
+
() => F.format ?? ((a, n) => n === "volume" ? U(a) : j(a))
|
|
24
|
+
), o = J(), i = G(o), C = w(0), W = () => {
|
|
25
|
+
C.value++;
|
|
26
26
|
};
|
|
27
27
|
D(() => {
|
|
28
|
-
o.on("overlayChange", W), o.getSeriesIds().length > 0 &&
|
|
28
|
+
o.on("overlayChange", W), o.getSeriesIds().length > 0 && C.value++;
|
|
29
29
|
}), M(() => {
|
|
30
30
|
o.off("overlayChange", W);
|
|
31
31
|
});
|
|
32
|
-
const t = s(() => o.getTheme()), O = s(() => o.getDataInterval()),
|
|
32
|
+
const t = s(() => o.getTheme()), O = s(() => o.getDataInterval()), c = s(() => (C.value, i.value ? $(o, {
|
|
33
33
|
time: i.value.time,
|
|
34
|
-
sort:
|
|
34
|
+
sort: A.value,
|
|
35
35
|
cacheKey: "tooltip"
|
|
36
36
|
}) : [])), z = s(() => i.value?.time ?? 0), T = X(), g = s(() => typeof T.default == "function"), B = w(null), b = w(null);
|
|
37
|
-
let
|
|
38
|
-
Y((
|
|
37
|
+
let S = null;
|
|
38
|
+
Y((a) => {
|
|
39
39
|
if (!g.value) return;
|
|
40
40
|
const n = B.value;
|
|
41
|
-
!n || typeof ResizeObserver > "u" || (
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
41
|
+
!n || typeof ResizeObserver > "u" || (S = new ResizeObserver((e) => {
|
|
42
|
+
const l = e[0]?.contentRect;
|
|
43
|
+
if (!l) return;
|
|
44
44
|
const y = b.value;
|
|
45
|
-
(!y || y.width !==
|
|
46
|
-
}),
|
|
47
|
-
|
|
45
|
+
(!y || y.width !== l.width || y.height !== l.height) && (b.value = { width: l.width, height: l.height });
|
|
46
|
+
}), S.observe(n), a(() => {
|
|
47
|
+
S?.disconnect(), S = null;
|
|
48
48
|
}));
|
|
49
49
|
});
|
|
50
50
|
const h = s(() => {
|
|
51
|
-
if (!i.value ||
|
|
52
|
-
const
|
|
51
|
+
if (!i.value || c.value.length === 0) return null;
|
|
52
|
+
const a = o.getMediaSize(), n = a.width - o.yAxisWidth, e = a.height - o.xAxisHeight;
|
|
53
53
|
if (g.value) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
54
|
+
const v = b.value;
|
|
55
|
+
return v ? R({
|
|
56
56
|
x: i.value.mediaX,
|
|
57
57
|
y: i.value.mediaY,
|
|
58
58
|
chartWidth: n,
|
|
59
59
|
chartHeight: e,
|
|
60
|
-
tooltipWidth:
|
|
61
|
-
tooltipHeight:
|
|
60
|
+
tooltipWidth: v.width,
|
|
61
|
+
tooltipHeight: v.height
|
|
62
62
|
}) : { left: 0, top: 0 };
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const l = c.value.some((v) => "open" in v.data), y = c.value.filter((v) => !("open" in v.data)).length, L = 160, N = l ? 140 : 40 + y * 22;
|
|
65
65
|
return R({
|
|
66
66
|
x: i.value.mediaX,
|
|
67
67
|
y: i.value.mediaY,
|
|
@@ -71,11 +71,11 @@ const ee = {
|
|
|
71
71
|
tooltipHeight: N
|
|
72
72
|
});
|
|
73
73
|
}), V = s(() => !g.value || b.value !== null);
|
|
74
|
-
function E(
|
|
75
|
-
return "open" in
|
|
74
|
+
function E(a) {
|
|
75
|
+
return "open" in a;
|
|
76
76
|
}
|
|
77
|
-
return (
|
|
78
|
-
|
|
77
|
+
return (a, n) => (r(), u(x, null, [
|
|
78
|
+
p(i) && c.value.length > 0 && h.value && !g.value ? (r(), u("div", {
|
|
79
79
|
key: 0,
|
|
80
80
|
style: m({
|
|
81
81
|
position: "absolute",
|
|
@@ -98,7 +98,7 @@ const ee = {
|
|
|
98
98
|
transition: "opacity 0.15s ease"
|
|
99
99
|
})
|
|
100
100
|
}, [
|
|
101
|
-
|
|
101
|
+
d("div", {
|
|
102
102
|
style: m({
|
|
103
103
|
fontSize: t.value.axis.fontSize + "px",
|
|
104
104
|
color: t.value.axis.textColor,
|
|
@@ -107,38 +107,38 @@ const ee = {
|
|
|
107
107
|
borderBottom: "1px solid " + t.value.tooltip.borderColor,
|
|
108
108
|
letterSpacing: "0.02em"
|
|
109
109
|
})
|
|
110
|
-
}, f(
|
|
111
|
-
(r(!0), u(x, null, H(
|
|
110
|
+
}, f(p(q)(z.value, { locale: p(o).timeScale.getLocale(), timeZone: p(o).timeScale.getTimeZone() })) + " " + f(p(o).timeScale.formatX(z.value, O.value)), 5),
|
|
111
|
+
(r(!0), u(x, null, H(c.value, (e) => (r(), u(x, {
|
|
112
112
|
key: e.id
|
|
113
113
|
}, [
|
|
114
|
-
E(e.data) ? (r(), u("div",
|
|
114
|
+
E(e.data) ? (r(), u("div", Q, [
|
|
115
115
|
(r(!0), u(x, null, H([
|
|
116
116
|
{ label: "Open", val: e.data.open, field: "open" },
|
|
117
117
|
{ label: "High", val: e.data.high, field: "high" },
|
|
118
118
|
{ label: "Low", val: e.data.low, field: "low" },
|
|
119
119
|
{ label: "Close", val: e.data.close, field: "close" }
|
|
120
|
-
], (
|
|
121
|
-
key:
|
|
120
|
+
], (l) => (r(), u(x, {
|
|
121
|
+
key: l.label
|
|
122
122
|
}, [
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
d("span", ee, f(l.label), 1),
|
|
124
|
+
d("span", {
|
|
125
125
|
style: m({
|
|
126
126
|
fontWeight: 600,
|
|
127
|
-
color:
|
|
127
|
+
color: p(K)(
|
|
128
128
|
e.data.close >= e.data.open ? t.value.candlestick.up.body : t.value.candlestick.down.body
|
|
129
129
|
),
|
|
130
130
|
textAlign: "right"
|
|
131
131
|
})
|
|
132
|
-
}, f(
|
|
132
|
+
}, f(k.value(l.val, l.field)), 5)
|
|
133
133
|
], 64))), 128)),
|
|
134
134
|
e.data.volume != null ? (r(), u(x, { key: 0 }, [
|
|
135
|
-
n[0] || (n[0] =
|
|
136
|
-
|
|
135
|
+
n[0] || (n[0] = d("span", { style: { opacity: 0.5 } }, "Volume", -1)),
|
|
136
|
+
d("span", {
|
|
137
137
|
style: m({ fontWeight: 600, color: t.value.tooltip.textColor, textAlign: "right" })
|
|
138
|
-
}, f(
|
|
138
|
+
}, f(k.value(e.data.volume, "volume")), 5)
|
|
139
139
|
], 64)) : _("", !0)
|
|
140
|
-
])) : (r(), u("div",
|
|
141
|
-
|
|
140
|
+
])) : (r(), u("div", te, [
|
|
141
|
+
d("span", {
|
|
142
142
|
style: m({
|
|
143
143
|
width: "8px",
|
|
144
144
|
height: "8px",
|
|
@@ -147,14 +147,14 @@ const ee = {
|
|
|
147
147
|
flexShrink: 0
|
|
148
148
|
})
|
|
149
149
|
}, null, 4),
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
d("span", oe, f(e.label ?? "Value"), 1),
|
|
151
|
+
d("span", {
|
|
152
152
|
style: m({ fontWeight: 600, color: e.color })
|
|
153
|
-
}, f(
|
|
153
|
+
}, f(k.value(e.data.value, "value")), 5)
|
|
154
154
|
]))
|
|
155
155
|
], 64))), 128))
|
|
156
156
|
], 4)) : _("", !0),
|
|
157
|
-
|
|
157
|
+
p(i) && c.value.length > 0 && h.value && g.value ? (r(), u("div", {
|
|
158
158
|
key: 1,
|
|
159
159
|
ref_key: "containerRef",
|
|
160
160
|
ref: B,
|
|
@@ -176,14 +176,14 @@ const ee = {
|
|
|
176
176
|
fontVariantNumeric: "tabular-nums",
|
|
177
177
|
color: t.value.tooltip.textColor,
|
|
178
178
|
width: "max-content",
|
|
179
|
-
maxWidth:
|
|
179
|
+
maxWidth: p(o).getMediaSize().width - p(o).yAxisWidth + "px",
|
|
180
180
|
boxSizing: "border-box",
|
|
181
181
|
zIndex: 10,
|
|
182
182
|
visibility: b.value !== null ? "visible" : "hidden"
|
|
183
183
|
})
|
|
184
184
|
}, [
|
|
185
|
-
|
|
186
|
-
snapshots:
|
|
185
|
+
Z(a.$slots, "default", {
|
|
186
|
+
snapshots: c.value,
|
|
187
187
|
time: z.value
|
|
188
188
|
})
|
|
189
189
|
], 12, le)) : _("", !0)
|
|
@@ -191,5 +191,5 @@ const ee = {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
export {
|
|
194
|
-
|
|
194
|
+
ce as default
|
|
195
195
|
};
|
package/dist/ui/YAxis.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, ref as p, onMounted as r, watch as s, onUnmounted as o, openBlock as
|
|
1
|
+
import { defineComponent as m, ref as p, onMounted as r, watch as s, onUnmounted as o, openBlock as b, createElementBlock as f, normalizeStyle as y, unref as u } from "vue";
|
|
2
2
|
import { mountAxisLabels as x } from "../core/dist/axis/dom-labels.js";
|
|
3
3
|
import { useChartInstance as h } from "../context.js";
|
|
4
4
|
const _ = /* @__PURE__ */ m({
|
|
@@ -23,7 +23,7 @@ const _ = /* @__PURE__ */ m({
|
|
|
23
23
|
t.value !== null && (l = x({ chart: n, container: t.value, axis: "y" }));
|
|
24
24
|
}), o(() => {
|
|
25
25
|
l?.(), l = null;
|
|
26
|
-
}), (L, S) => (
|
|
26
|
+
}), (L, S) => (b(), f("div", {
|
|
27
27
|
ref_key: "containerRef",
|
|
28
28
|
ref: t,
|
|
29
29
|
style: y({
|