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) {
gargantext.controller("GraphController", function($scope, $http, $element) {
// initialization
$scope.datasets = [{color: '#FFF'}];
$scope.datasets = [{}];
$scope.resultsList = [];
$scope.queries = {};
$scope.graph = {
......@@ -290,7 +290,11 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
};
// add a dataset
$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
$scope.showResults = function(keys) {
......
......@@ -262,6 +262,12 @@
<button class="refresh" ng-click="query()">Refresh results</button>
<button class="add" ng-click="addDataset()">Add a dataset...</button>
<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">
<linechart data="graph.data" options="graph.options"></linechart>
</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