Open vedbhawsar opened 6 years ago
@nicolaskruchten I have done a workaround for this by updating the d3_renderers.js
file by adding below code, Reference
The default sort is:
.sort(function(a,b) {
return b.value - a.value;
})
Changing this to the reverse:
.sort(function(a,b) {
return a.value - b.value;
})
So now the treemap call in renderers file look like this:
var treemap = d3.layout.treemap()
.size([width, height])
.sticky(true)
.sort(function(a,b) {
return a.value - b.value;
})
.value(function(d) { return d.size; });
can we do something to have the treemap sorting feature through options?
Hi @nicolaskruchten , I just want to know if you already have a way to place the largest value for treemap blocks first in order then the smaller ones.