DC.js - barChart not filtered on click of geoChoroplethChart
<p>I have a choropleth map of counties, and a bar chart showing population of each county on the map. When I click on the bar chart the map is filtered and redrawn to show the selected bar, but when I click on the a county in the choropleth map the bar chart is not filtered to show the population data. I don't understand why it would be filtering one way but not the other. Any help is appreciated! </p>

<pre><code>&lt;div id="iowa-map"&gt;
    &lt;strong&gt;Population by counties (color: total population)&lt;/strong&gt;
    &lt;a class="reset" href="javascript:iowaMap.filterAll();dc.redrawAll();" style="display: none; "&gt;reset&lt;/a&gt;
    &lt;span class="reset" style="display: none;"&gt; | Current filter: &lt;span class="filter"&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;div class="clearfix"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id="population-chart"&gt;
    &lt;strong&gt;Population by county&lt;/strong&gt;
    &lt;a class="reset" href="javascript:populationChart.filterAll();dc.redrawAll();" style="display: none; "&gt;reset&lt;/a&gt;
    &lt;span class="reset" style="display: none;"&gt; | Current filter: &lt;span class="filter"&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;div class="clearfix"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class="clearfix"&gt;&lt;/div&gt;

&lt;div&gt;
    &lt;a href="javascript:dc.filterAll(); dc.renderAll();"&gt;Reset All&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p></p>

<pre><code>var iowaMap = dc.geoChoroplethChart("#iowa-map");
var populationChart = dc.barChart("#population-chart");

d3.csv("iowaCountiesPop.csv", function (data) {

      data.forEach(function (d) {
        d.county = d.county;
        d.popByCounty = +d.e2015; 
      });

      var data = crossfilter(data);

      var counties = data.dimension(function (d) {
        return d.county;
      });

      var counties2 = data.dimension(function (d) {
        return d.county;
      });

      var popByCounty = counties.group().reduceSum(function (d) {
        return d.popByCounty;
      });


    d3.json("IowaCounties.json", function (countiesJson) {
        iowaMap.width(990)
                .height(500)
                .dimension(counties)
                .group(popByCounty)
                .projection(d3.geo.mercator()
                    .translate([495, 250])
                    .rotate([93 + 20 / 60, -41 - 60 / 60])
                    .scale(7900))
                .colors(d3.scale.quantile().range(colorScheme[quantiles]))
                .colorDomain([0, 430640])
                .overlayGeoJson(countiesJson.features, "NAME", function (d) {
                    return d.properties.NAME;
                })
                .title(function (d) {
                    return d.key + " County \nTotal Population: " + numberFormat(d.value);
                })
                .on('renderlet', function(map) {
                    map.selectAll("path").on("click", function(d) {
                    //console.log("click!", d)
                     map.filter(d.properties.NAME)
                        .redrawGroup();
                    })
                });


         populationChart.width(width)
            .height(height)
            .dimension(counties2)
            .group(popByCounty)
            .x(d3.scale.ordinal().domain(counties))
            .xUnits(dc.units.ordinal)
            .margins({top: 0, right: 0, bottom: 70, left: 70})
            .yAxisLabel(["Population Values"])//,[12]) 
            .xAxisLabel("County Names")
            .barPadding(0.1)
            .outerPadding(0.05)
            .elasticY(false)
            //.turnOnControls(true)
            .on('renderlet', function(chart) {
                chart.selectAll('rect').on("click", function(d) {
                    //console.log("click!", d)
                    chart.filter(d.data.key)
                        .redrawGroup();
                })
                chart.selectAll("g.x text")
                    .style("text-anchor", "end")    
                    .attr("dx","-8")
                    .attr("dy", "5")        
                    .attr("transform", "rotate(-50)");
            });

        dc.renderAll();

    }); 

});
</code></pre>

<p></p>