Commit 40eca560 authored by Romain Loth's avatar Romain Loth

legends: when cluster/partition attr, sort by reverse card

parent d767450c
......@@ -410,6 +410,12 @@ function updateColorsLegend ( daclass, forTypes, groupedByTicks ) {
var legendInfo = groupedByTicks || TW.Facets[curType][daclass].invIdx
if (getColorFunction(daclass) == "clusterColoring") {
legendInfo.sort(function(a,b) {
return b.nids.length - a.nids.length
})
}
// valueclasses (values or intervals or classes) are already sorted in TW.Facets
for (var l in legendInfo) {
var nMatchedNodes = legendInfo[l]['nids'].length
......
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