<link rel="stylesheet" type="text/css" href="http://dc-js.github.io/dc.js/css/dc.css" />
<div>
<p>When filtering items in a crossfilter data set with dc.js, items are filtered using an || filter. For example, if you click "Mr. A" and "Mr. B" on the row chart, all the items that have "Mr. A" || "Mr. B" with be selected. But in the case of items grouped by tags, we want an && filtering. So we use the crossfilter dimension.filterFunction with dynamically created filter functions to create this effect.</p>
</div>
<div id="tags">
<label>
<input type="checkbox" id="tag1" />Tag 1</label>
<label>
<input type="checkbox" id="tag2" />Tag 2</label>
<label>
<input type="checkbox" id="tag3" />Tag 3</label>
</div>
<div id="chart-ring-year"></div>
<div id="chart-row-spenders"></div>
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/d3.js"></script>
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/crossfilter.js"></script>
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/dc.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
CSS
p {
font-size: 12px;
}
#tags {
margin-bottom:10px;
}