mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
Create more types for UI
This commit is contained in:
parent
3ed6fd79ac
commit
3aba82f917
|
@ -16,7 +16,7 @@ import 'echarts/lib/component/dataZoom';
|
|||
import 'echarts/lib/component/visualMap';
|
||||
import 'echarts/lib/component/visualMapPiecewise';
|
||||
|
||||
import { ClosedTrade } from '@/types';
|
||||
import { ClosedTrade, CumProfitData } from '@/types';
|
||||
|
||||
// Define Column labels here to avoid typos
|
||||
const CHART_PROFIT = 'Profit';
|
||||
|
@ -31,7 +31,7 @@ export default class CumProfitChart extends Vue {
|
|||
@Prop({ required: true }) trades!: ClosedTrade[];
|
||||
|
||||
get cumulativeData() {
|
||||
const res: Record<string, any>[] = [];
|
||||
const res: CumProfitData[] = [];
|
||||
const closedTrades = this.trades; // .filter((t) => t.close_timestamp);
|
||||
|
||||
closedTrades.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
||||
|
|
5
src/types/chart.d.ts
vendored
Normal file
5
src/types/chart.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface CumProfitData {
|
||||
date: number;
|
||||
profit: number;
|
||||
raising: boolean;
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
export * from './auth.types';
|
||||
export * from './auth.d';
|
||||
export * from './chart.d';
|
||||
|
||||
export * from './types';
|
||||
export * from './types.d';
|
||||
|
|
Loading…
Reference in New Issue
Block a user