From 494902eae79f0b038b012a23b3a028fcf2b08e1c Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 5 Jan 2021 19:29:47 +0100 Subject: [PATCH] Add tradesLog chart --- src/components/charts/TradesLog.vue | 140 ++++++++++++++++++++++++++++ src/store/modules/layout.ts | 2 + src/views/Dashboard.vue | 20 ++++ 3 files changed, 162 insertions(+) create mode 100644 src/components/charts/TradesLog.vue diff --git a/src/components/charts/TradesLog.vue b/src/components/charts/TradesLog.vue new file mode 100644 index 00000000..0c446bb3 --- /dev/null +++ b/src/components/charts/TradesLog.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/src/store/modules/layout.ts b/src/store/modules/layout.ts index 760c9b0a..4cac1796 100644 --- a/src/store/modules/layout.ts +++ b/src/store/modules/layout.ts @@ -15,6 +15,7 @@ export enum DashboardLayout { dailyChart = 'g-dailyChart', hourlyChart = 'g-hourlyChart', cumChartChart = 'g-cumChartChart', + tradesLogChart = 'g-TradesLogChart', } export enum LayoutGetters { @@ -50,6 +51,7 @@ const DEFAULT_DASHBOARD_LAYOUT: GridItemData[] = [ { i: DashboardLayout.dailyChart, x: 4, y: 0, w: 4, h: 6 }, { i: DashboardLayout.hourlyChart, x: 4, y: 6, w: 4, h: 6 }, { i: DashboardLayout.cumChartChart, x: 0, y: 6, w: 4, h: 6 }, + { i: DashboardLayout.tradesLogChart, x: 0, y: 8, w: 12, h: 4 }, ]; const STORE_DASHBOARD_LAYOUT = 'ftDashboardLayout'; diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index be9e1097..08efd535 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -95,6 +95,20 @@ + + + + + @@ -108,6 +122,7 @@ import { GridLayout, GridItem, GridItemData } from 'vue-grid-layout'; import DailyChart from '@/components/charts/DailyChart.vue'; import HourlyChart from '@/components/charts/HourlyChart.vue'; import CumProfitChart from '@/components/charts/CumProfitChart.vue'; +import TradesLogChart from '@/components/charts/TradesLog.vue'; import DraggableContainer from '@/components/layout/DraggableContainer.vue'; import { @@ -128,6 +143,7 @@ const layoutNs = namespace('layout'); DailyChart, HourlyChart, CumProfitChart, + TradesLogChart, DraggableContainer, }, }) @@ -183,6 +199,10 @@ export default class Dashboard extends Vue { return findGridLayout(this.gridLayout, DashboardLayout.cumChartChart); } + get gridLayoutTradesLogChart(): GridItemData { + return findGridLayout(this.gridLayout, DashboardLayout.tradesLogChart); + } + mounted() { this.getDaily({ timescale: 30 }); this.getTrades();