Show signal type in chart tooltip

This commit is contained in:
Matthias 2024-07-10 06:58:58 +02:00
parent 291502f6de
commit 1b087065b5

View File

@ -256,6 +256,9 @@ function updateChart(initial = false) {
itemStyle: {
color: buySignalColor,
},
tooltip: {
valueFormatter: (value) => (value ? `Long entry ${value}` : ''),
},
encode: {
x: colDate,
y: colEntryData,
@ -279,6 +282,9 @@ function updateChart(initial = false) {
itemStyle: {
color: sellSignalColor,
},
tooltip: {
valueFormatter: (value) => (value ? `Long exit ${value}` : ''),
},
encode: {
x: colDate,
y: colExitData,
@ -302,6 +308,7 @@ function updateChart(initial = false) {
color: shortEntrySignalColor,
},
tooltip: {
valueFormatter: (value) => (value ? `Short entry ${value}` : ''),
// Hide tooltip - it's already there for longs.
// show: false,
},
@ -324,8 +331,7 @@ function updateChart(initial = false) {
color: shortexitSignalColor,
},
tooltip: {
// Hide tooltip - it's already there for longs.
// show: false,
valueFormatter: (value) => (value ? `Short exit ${value}` : ''),
},
encode: {
x: colDate,