mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 04:04:00 -06:00
added an if to check for null to sort null as 0 (#10961)
* added an if to check for null to sort null as 0 * changed 0 to -Infinity
This commit is contained in:
parent
7d0c3ae6a7
commit
1293fcadd2
@ -151,7 +151,11 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
|
||||
|
||||
if (panel.legend.sort) {
|
||||
seriesList = _.sortBy(seriesList, function(series) {
|
||||
return series.stats[panel.legend.sort];
|
||||
let sort = series.stats[panel.legend.sort];
|
||||
if (sort === null) {
|
||||
sort = -Infinity;
|
||||
}
|
||||
return sort;
|
||||
});
|
||||
if (panel.legend.sortDesc) {
|
||||
seriesList = seriesList.reverse();
|
||||
|
Loading…
Reference in New Issue
Block a user