Commit 4feb6726 authored by Mathieu Rodic's avatar Mathieu Rodic

[BUGFIX] removing a dataset happens properly on advanced charts

parent 04cf4a95
...@@ -360,7 +360,8 @@ gargantext.controller('GraphController', function($scope, $http, $element) { ...@@ -360,7 +360,8 @@ gargantext.controller('GraphController', function($scope, $http, $element) {
// remove a dataset // remove a dataset
$scope.removeDataset = function(datasetIndex) { $scope.removeDataset = function(datasetIndex) {
if ($scope.datasets.length > 1) { if ($scope.datasets.length > 1) {
$scope.datasets.shift(datasetIndex); $scope.datasets.splice(datasetIndex, 1);
dataset_results.splice(datasetIndex, 1);
$scope.updateDatasets(); $scope.updateDatasets();
} else { } else {
alert('You can not remove the last dataset.') alert('You can not remove the last dataset.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment