mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
having values ordered by Y, messes up the data so removing this
This commit is contained in:
parent
337acd0b7f
commit
42c3fcf248
@ -46,7 +46,7 @@ angular.module('highchart', [])
|
||||
|
||||
// We need to make sure that for each category, each series has a value.
|
||||
var categories = _.union.apply(this, _.map(scope.series, function(s) { return _.pluck(s.data,'x')}));
|
||||
|
||||
|
||||
_.each(scope.series, function(s) {
|
||||
// TODO: move this logic to Query#getChartData
|
||||
var yValues = _.groupBy(s.data, 'x');
|
||||
@ -54,9 +54,10 @@ angular.module('highchart', [])
|
||||
var newData = _.sortBy(_.map(categories, function(category) {
|
||||
return {
|
||||
name: category,
|
||||
y: yValues[category][0].y
|
||||
y: yValues[category] && yValues[category][0].y
|
||||
}
|
||||
}), 'y');
|
||||
}), 'name');
|
||||
|
||||
s.data = newData;
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user