mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 13:05:15 +00:00
Merge pull request #632 from Gjuju/TradeLogs
TradeLog info Box rearrengement
This commit is contained in:
commit
9698b5c836
|
@ -24,6 +24,8 @@ import {
|
||||||
|
|
||||||
import { ClosedTrade } from '@/types';
|
import { ClosedTrade } from '@/types';
|
||||||
|
|
||||||
|
import { timestampms } from '@/shared/formatters';
|
||||||
|
|
||||||
use([
|
use([
|
||||||
BarChart,
|
BarChart,
|
||||||
LineChart,
|
LineChart,
|
||||||
|
@ -62,10 +64,15 @@ export default class TradesLogChart extends Vue {
|
||||||
.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
||||||
for (let i = 0, len = sortedTrades.length; i < len; i += 1) {
|
for (let i = 0, len = sortedTrades.length; i < len; i += 1) {
|
||||||
const trade = sortedTrades[i];
|
const trade = sortedTrades[i];
|
||||||
const entry = [i, (trade.profit_ratio * 100).toFixed(2), trade.pair, trade.botName];
|
const entry = [
|
||||||
|
i,
|
||||||
|
(trade.profit_ratio * 100).toFixed(2),
|
||||||
|
trade.pair,
|
||||||
|
trade.botName,
|
||||||
|
timestampms(trade.close_timestamp),
|
||||||
|
];
|
||||||
res.push(entry);
|
res.push(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +93,10 @@ export default class TradesLogChart extends Vue {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: (params) => {
|
formatter: (params) => {
|
||||||
return `Profit %<br>${params[0].data[1]} % ${params[0].data[2]} | ${params[0].data[3]}`;
|
if (params[0].data[3]) {
|
||||||
|
return `${params[0].data[2]} | ${params[0].data[3]}<br>${params[0].data[4]}<br>Profit ${params[0].data[1]} %`;
|
||||||
|
}
|
||||||
|
return `${params[0].data[2]}<br>${params[0].data[4]}<br>Profit ${params[0].data[1]} %`;
|
||||||
},
|
},
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user