Commit 8518a581 authored by Mathieu Rodic's avatar Mathieu Rodic

[BUGFIX] Removal of datasets is now possible in the charts

parent f04520e7
...@@ -260,7 +260,7 @@ gargantext.controller("DatasetController", function($scope, $http) { ...@@ -260,7 +260,7 @@ gargantext.controller("DatasetController", function($scope, $http) {
gargantext.controller("GraphController", function($scope, $http, $element) { gargantext.controller("GraphController", function($scope, $http, $element) {
// initialization // initialization
$scope.datasets = [{color: '#FFF'}]; $scope.datasets = [{}];
$scope.resultsList = []; $scope.resultsList = [];
$scope.queries = {}; $scope.queries = {};
$scope.graph = { $scope.graph = {
...@@ -290,7 +290,11 @@ gargantext.controller("GraphController", function($scope, $http, $element) { ...@@ -290,7 +290,11 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
}; };
// add a dataset // add a dataset
$scope.addDataset = function() { $scope.addDataset = function() {
$scope.datasets.push({color: '#FFF'}); $scope.datasets.push({});
};
// remove a dataset
$scope.removeDataset = function(datasetIndex) {
$scope.datasets.shift(datasetIndex);
}; };
// show results on the graph // show results on the graph
$scope.showResults = function(keys) { $scope.showResults = function(keys) {
......
...@@ -262,6 +262,12 @@ ...@@ -262,6 +262,12 @@
<button class="refresh" ng-click="query()">Refresh results</button> <button class="refresh" ng-click="query()">Refresh results</button>
<button class="add" ng-click="addDataset()">Add a dataset...</button> <button class="add" ng-click="addDataset()">Add a dataset...</button>
<hr/> <hr/>
<div class="graph-parameters">
<select ng-model="graph.options.axes.y.type">
<option ng-repeat="(key, value) in {linear: 'linear', logarithmic: 'log'}" value="{{ value }}">{{ key }}</option>
</select>
scale
</div>
<div class="graph"> <div class="graph">
<linechart data="graph.data" options="graph.options"></linechart> <linechart data="graph.data" options="graph.options"></linechart>
</div> </div>
......
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