Reputation: 357
How can i remove empty bars from dc.js row chart, whenever the dimension is null or empty, there appears an empty bar on row chart.
Upvotes: 2
Views: 375
Reputation: 1206
You have to use fake group
const remove_empty_bins = (source_group) => {
return {
all: () => {
return source_group.all().filter(function(d) {
// here your condition
return d.key !== null && d.key !== '' && d.value !== 0; // etc.
});
}
};
}
let myFilteredGroup = remove_empty_bins(myGroup);
Upvotes: 1