From 8baa97e01247c636208493ff4b98e8e0edb29dfe Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 13 Oct 2021 19:33:05 +0200 Subject: [PATCH] Fix spiky profit columns --- src/components/charts/CumProfitChart.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/charts/CumProfitChart.vue b/src/components/charts/CumProfitChart.vue index 0c2f6443..5b57846e 100644 --- a/src/components/charts/CumProfitChart.vue +++ b/src/components/charts/CumProfitChart.vue @@ -74,13 +74,14 @@ export default class CumProfitChart extends Vue { resD[trade.close_timestamp] = { profit, [trade.botId]: profit }; } else { // Add to existing profit - resD[trade.close_timestamp].profit += profit; + resD[trade.close_timestamp].profit += trade[this.profitColumn]; if (resD[trade.close_timestamp][trade.botId]) { - resD[trade.close_timestamp][trade.botId] += profit; + resD[trade.close_timestamp][trade.botId] += trade[this.profitColumn]; } else { resD[trade.close_timestamp][trade.botId] = profit; } } + console.log(trade.close_date, profit); res.push({ date: trade.close_timestamp, profit, [trade.botId]: profit }); if (!this.botList.includes(trade.botId)) { this.botList.push(trade.botId);