Composite chart problem

by Sourabh Tewari

HTML

<script src="https://rawgithub.com/square/crossfilter/master/crossfilter.js"></script>
<script src="https://rawgithub.com/mbostock/d3/master/d3.js"></script>
<script src="https://rawgithub.com/NickQiZhu/dc.js/master/dc.js"></script>
<link rel="stylesheet" href="https://rawgithub.com/NickQiZhu/dc.js/master/dc.css">
<div id="test"></div>
<div id="test2"></div>
<div id="test3"></div>

CSS

.dc-chart rect.bar {
opacity: 0.70;
}

JavaScript

(function() {
    var compositeChart = dc.compositeChart;
    dc.compositeChart = function(parent, chartGroup) {
        var _chart = compositeChart(parent, chartGroup);
        
        _chart._brushing = function () {
            var extent = _chart.extendBrush();
            var rangedFilter = null;
            if(!_chart.brushIsEmpty(extent)) {
                rangedFilter = dc.filters.RangedFilter(extent[0], extent[1]);
            }

            dc.events.trigger(function () {
                if (!rangedFilter) {
                    _chart.filter(null);
                } else {
                    _chart.replaceFilter(rangedFilter);
                }
                _chart.redrawGroup();
            }, dc.constants.EVENT_DELAY);
        };
        
        return _chart;
    };
})();

var payments = crossfilter([
    {date: "2011-11-14T16:17:54Z", quantity: 2, total: 390, tip: 100, type: "tab", set: "set1"},
  {date: "2011-11-14T16:20:19Z", quantity: 2, total: 420, tip: 100, type: "tab", set: "set1"},
  {date: "2011-11-14T16:28:54Z", quantity: 1, total: 420, tip: 200, type: "visa", set: "set1"},
  {date: "2011-11-14T17:07:21Z", quantity: 2, total: 380, tip: 0, type: "tab", set: "set1"},
  {date: "2011-11-14T17:22:59Z", quantity: 2, total: 380, tip: 0, type: "tab", set: "set1"},
  {date: "2011-11-14T17:25:45Z", quantity: 2, total: 200, tip: 0, type: "cash", set: "set1"},
  {date: "2011-11-14T16:30:43Z", quantity: 2, total: 90, tip: 0, type: "tab", set: "set0"},
  {date: "2011-11-14T16:48:46Z", quantity: 2, total: 60, tip: 0, type: "tab", set: "set0"},
  {date: "2011-11-14T16:53:41Z", quantity: 2, total: 100, tip: 0, type: "tab", set: "set0"},
  {date: "2011-11-14T16:54:06Z", quantity: 1, total: 100, tip: 0, type: "cash", set: "set0"},
  {date: "2011-11-14T16:58:03Z", quantity: 3, total: 60, tip: 0, type: "tab", set: "set0"},
  {date: "2011-11-14T17:29:52Z", quantity: 1, total: 200, tip: 100, type: "visa", set: "set0"},
  {date: "2011-11-14T16:58:03Z",...