From 6f477b6d225cca1cb2e959aa38c5fb0283fd8589 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Tue, 4 Jul 2017 20:35:53 +0200 Subject: [PATCH] Unload chart data before loading new one. --- src/operations/balance-chart.component.js | 2 ++ src/operations/category-chart.component.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/operations/balance-chart.component.js b/src/operations/balance-chart.component.js index 836f140..4185e49 100644 --- a/src/operations/balance-chart.component.js +++ b/src/operations/balance-chart.component.js @@ -53,6 +53,8 @@ var balanceChartModule = angular.module('balanceChartModule', [ ]; }); + vm.chart.unload(); + vm.chart.load({ rows: headers.concat(rows) }); diff --git a/src/operations/category-chart.component.js b/src/operations/category-chart.component.js index b2efdea..4e7249d 100644 --- a/src/operations/category-chart.component.js +++ b/src/operations/category-chart.component.js @@ -66,6 +66,8 @@ var categoryChartModule = angular.module('categoryChartModule', [ colors[expensesName] = expensesColor; }); + vm.chart.unload(); + vm.chart.load({ columns: revenues.concat(expenses), names: names,