Unload chart data before loading new one.

This commit is contained in:
Alexis Lahouze 2017-07-04 20:35:53 +02:00
parent 0f547a532c
commit 6f477b6d22
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,8 @@ var balanceChartModule = angular.module('balanceChartModule', [
]; ];
}); });
vm.chart.unload();
vm.chart.load({ vm.chart.load({
rows: headers.concat(rows) rows: headers.concat(rows)
}); });

View File

@ -66,6 +66,8 @@ var categoryChartModule = angular.module('categoryChartModule', [
colors[expensesName] = expensesColor; colors[expensesName] = expensesColor;
}); });
vm.chart.unload();
vm.chart.load({ vm.chart.load({
columns: revenues.concat(expenses), columns: revenues.concat(expenses),
names: names, names: names,