Commit f8b8799d authored by Mathieu Rodic's avatar Mathieu Rodic

[BUG] Corpus with different time spans were not displayed

https://forge.iscpif.fr/issues/1407
[FEATURE] View should be 'linear' by default, not 'bundle'
https://forge.iscpif.fr/issues/1388
parent 3b01c999
...@@ -381,7 +381,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) { ...@@ -381,7 +381,7 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
y: {key: 'y', type: 'linear', type: 'numeric'}, y: {key: 'y', type: 'linear', type: 'numeric'},
}, },
tension: 1.0, tension: 1.0,
lineMode: 'bundle', lineMode: 'linear',
tooltip: {mode: 'scrubber', formatter: function(x, y, series) { tooltip: {mode: 'scrubber', formatter: function(x, y, series) {
var grouping = groupings.datetime[$scope.groupingKey]; var grouping = groupings.datetime[$scope.groupingKey];
return grouping.representation(x) + ' → ' + y; return grouping.representation(x) + ' → ' + y;
...@@ -442,6 +442,13 @@ gargantext.controller("GraphController", function($scope, $http, $element) { ...@@ -442,6 +442,13 @@ gargantext.controller("GraphController", function($scope, $http, $element) {
angular.forEach(results, function(result, r){ angular.forEach(results, function(result, r){
var x = grouping.truncate(result[0]); var x = grouping.truncate(result[0]);
var y = parseFloat(result[1]); var y = parseFloat(result[1]);
if (dataObject[x] === undefined) {
var row = [];
angular.forEach($scope.datasets, function(){
row.push(0);
});
dataObject[x] = row;
}
dataObject[x][datasetIndex] += y; dataObject[x][datasetIndex] += y;
}); });
}); });
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
<br/> <br/>
Interpolation: Interpolation:
<select ng-model="graph.options.lineMode"> <select ng-model="graph.options.lineMode">
<option ng-repeat="mode in ['bundle', 'linear']" value="{{ mode }}">{{ mode }}</option> <option ng-repeat="mode in ['linear', 'bundle']" value="{{ mode }}">{{ mode }}</option>
</select> </select>
<span ng-if="graph.options.lineMode != 'linear'"> <span ng-if="graph.options.lineMode != 'linear'">
with a tension of with a tension of
......
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