I am using the JavaScript library dc.js to dynamically generate a table of records using the dc.dataTable()
. The data is rather simple, so I actually want to show it as a plain list of rows without any grouping.
However, dc.dataTable()
requires a .group()
attribute. Each such group is then shown with an extra row in the resulting table before its data rows.
var datatable = dc.dataTable("#category-table");
datatable
.dimension(categoryDim)
.group(function(d) {return "Categories";}) //just 1 static group, so it's only 1 unnecessary group label row at least
.columns([
function(d) { return d.category_name; },
function(d) { return d.views;},
]);
If I skip the .group()
part, I get
Mandatory attribute chart.group is missing on chart
Is there any way to hide these group label rows or skip the grouping altogether?