title: Filtering option in D3
body: <p>I am working on D3(Rickshaw framework) where I have to filter the data using the name. </p>
  
  <p>Here is the code which rickshaw uses for creating the circle.</p>
  
  <pre><code>var nodes = graph.vis.selectAll("path").data(series.stack.filter(function(d) {
      return d.y !== null
  })).enter().append("svg:circle").attr("cx", function(d) {
      return graph.x(d.x)
  }).attr("cy", function(d) {
      return graph.y(d.y)
  }).attr("fill-opacity", 1.0).attr('transform', 'translate(22,0)').attr("r", function(d) {
      return ("r" in d) ? d.r : graph.renderer.dotSize
  });
  </code></pre>
  
  <p>I tried to filter the data like</p>
  
  <pre><code>$('#BestBrands input').on("change", function () {   
      console.log("called")
      var selected = $(this).attr('name'),
          display = this.checked ? "inline" : "none";
      console.log(selected)
  
      graph.vis.selectAll(".filter")
          .data(series.stack.filter(function(d) {
              return series.name[0] == selected
          }))    
          .attr("display", display);
  });
  </code></pre>
  
  <p>//series.name is equal to d.name in d3.js so series[0] is first co-ordinates name
  It`s not working. Do I need to append any class in the class? I am not clear with this. What should I do here to filter the data according to the name? </p>