diff --git a/src/components/charts/CumProfitChart.vue b/src/components/charts/CumProfitChart.vue index 3b1b6923..0c2f6443 100644 --- a/src/components/charts/CumProfitChart.vue +++ b/src/components/charts/CumProfitChart.vue @@ -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)); diff --git a/src/types/chart.ts b/src/types/chart.ts index 39185d7c..ab6f2774 100644 --- a/src/types/chart.ts +++ b/src/types/chart.ts @@ -2,3 +2,7 @@ export interface CumProfitData { [date: string]: number; profit: number; } + +export interface CumProfitDataPerDate { + [key: number]: CumProfitData; +}