I'm trying to use filters in crossfilter, but nope.
Here's the JSBin
Here's the most relevant code:
var userDimension = data.dimension(function(d) {return d.user;}).filter(['John', 'Paul']);
var totalSalesByUser = userDimension.group();
var pieChartUserSales = dc.pieChart("#pie-chart-sales-by-user");
pieChartUserSales
.width(150).height(150)
.dimension(userDimension)
.group(totalSalesByUser);
dc.renderAll();
The pie chart looks the same with and without the filter, but the effect I'm looking for is narrowing it down to the items where John or Paul is the user.