The grouping is a cool idea, but yeah, not supported :(. Pull requests are definitely encouraged. :)
On the question of ordering, it looks like the code forces an ascending sort in the rows/cols methods.
var chart = dc.heatmap('#foobar')
.dimension....
var _rows;
chart.rows = function (_) {
if (arguments.length) {
_rows = _;
return chart;
}
if (_rows) {
return _rows;
}
var rowValues = chart.data().map(chart.valueAccessor());
// Sort the rowValues however you want.
rowValues.sort(function (a, b) {
// Your comparator
});
return d3.scale.ordinal().domain(rowValues);
}
Now, I actually dislike this code... The `uniq` function is unnecessary, these getter/setter methods do more than they should (i.e. the scale creation should be done in redraw/render of a chart), and it forces the ascending sort.
So I encourage you to go and create a pull request to make the sorting for rows/columns configurable :). If you don't, I will...