diff --git a/src/components/charts/CumProfitChart.vue b/src/components/charts/CumProfitChart.vue index e3935bff..e744bd21 100644 --- a/src/components/charts/CumProfitChart.vue +++ b/src/components/charts/CumProfitChart.vue @@ -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[] = []; + const res: CumProfitData[] = []; const closedTrades = this.trades; // .filter((t) => t.close_timestamp); closedTrades.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1)); diff --git a/src/types/auth.types.ts b/src/types/auth.d.ts similarity index 100% rename from src/types/auth.types.ts rename to src/types/auth.d.ts diff --git a/src/types/chart.d.ts b/src/types/chart.d.ts new file mode 100644 index 00000000..a7448f99 --- /dev/null +++ b/src/types/chart.d.ts @@ -0,0 +1,5 @@ +export interface CumProfitData { + date: number; + profit: number; + raising: boolean; +} diff --git a/src/types/index.ts b/src/types/index.ts index a49f36ea..d97e095c 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,3 +1,4 @@ -export * from './auth.types'; +export * from './auth.d'; +export * from './chart.d'; -export * from './types'; +export * from './types.d'; diff --git a/src/types/types.ts b/src/types/types.d.ts similarity index 100% rename from src/types/types.ts rename to src/types/types.d.ts