reverse sort order to lump minorities in 'other' instead of majorities (#242)
This commit is contained in:
committed by
Corey Hammerton
parent
0576e6d955
commit
59f27943fc
@@ -61,7 +61,7 @@
|
||||
value: 0,
|
||||
}
|
||||
]
|
||||
var fact_values = data.map(function(item) { return [item.label, item.value]; }).filter(function(item){return item[0];}).sort(function(a,b){return a[1] - b[1];});
|
||||
var fact_values = data.map(function(item) { return [item.label, item.value]; }).filter(function(item){return item[0];}).sort(function(a,b){return b[1] - a[1];});
|
||||
var realdata = fact_values.slice(0, 15);
|
||||
var otherdata = fact_values.slice(15);
|
||||
if (otherdata.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user