mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-14 04:03:51 +00:00
Show tooltip for current_profit
This commit is contained in:
parent
d5ac4bce16
commit
f374939890
|
@ -128,9 +128,7 @@ function updateChart(initial = false) {
|
||||||
name: 'currentProfit',
|
name: 'currentProfit',
|
||||||
|
|
||||||
animation: initial,
|
animation: initial,
|
||||||
tooltip: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: openProfit.value > 0 ? 'green' : 'red',
|
color: openProfit.value > 0 ? 'green' : 'red',
|
||||||
type: 'dotted',
|
type: 'dotted',
|
||||||
|
@ -193,9 +191,14 @@ function initializeChart() {
|
||||||
show: props.showTitle,
|
show: props.showTitle,
|
||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0)',
|
backgroundColor: 'rgba(0, 0, 0, 0)',
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
formatter: (params) => {
|
||||||
|
const profit = params[0].data.profit;
|
||||||
|
const currentProfit = params[0].data['currentProfit'];
|
||||||
|
const profitText = currentProfit ? `Current Profit: ${currentProfit}` : `Profit: ${profit}`;
|
||||||
|
return profitText;
|
||||||
|
},
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
label: {
|
label: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user