mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
Properly type cumProfitData ...
This commit is contained in:
parent
6bae907712
commit
32d2503947
|
@ -20,7 +20,7 @@ import {
|
|||
TooltipComponent,
|
||||
} from 'echarts/components';
|
||||
|
||||
import { ClosedTrade, CumProfitData } from '@/types';
|
||||
import { ClosedTrade, CumProfitData, CumProfitDataPerDate } from '@/types';
|
||||
|
||||
use([
|
||||
BarChart,
|
||||
|
@ -58,7 +58,7 @@ export default class CumProfitChart extends Vue {
|
|||
get cumulativeData() {
|
||||
this.botList = [];
|
||||
const res: CumProfitData[] = [];
|
||||
const resD = {};
|
||||
const resD: CumProfitDataPerDate = {};
|
||||
const closedTrades = this.trades
|
||||
.slice()
|
||||
.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
||||
|
|
|
@ -2,3 +2,7 @@ export interface CumProfitData {
|
|||
[date: string]: number;
|
||||
profit: number;
|
||||
}
|
||||
|
||||
export interface CumProfitDataPerDate {
|
||||
[key: number]: CumProfitData;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user