title: select brushed selection on load with d3.js
body: <p>I'm implementing the <a href="http://bl.ocks.org/jasondavies/1341281" rel="nofollow">parallel coordinates</a> d3.js visualization, and I was wondering if there is a way of pre-selecting a brushed selection on page load (or on button click). </p>
  
  <p>I know I need to do some of the following, but it is not clear to me what is the relevant part: </p>
  
  <pre><code>  .call(d3.behavior.drag()
      .on("dragstart", function(d) {
        dragging[d] = this.__origin__ = x(d);
        background.attr("visibility", "hidden");
      })
      .on("drag", function(d) {
        dragging[d] = Math.min(w, Math.max(0, this.__origin__ += d3.event.dx));
        foreground.attr("d", path);
        dimensions.sort(function(a, b) { return position(a) - position(b); });
        x.domain(dimensions);
        g.attr("transform", function(d) { return "translate(" + position(d) + ")"; })
      })
      .on("dragend", function(d) {
        delete this.__origin__;
        delete dragging[d];
        transition(d3.select(this)).attr("transform", "translate(" + x(d) + ")");
        transition(foreground)
            .attr("d", path);
        background
            .attr("d", path)
            .transition()
            .delay(500)
            .duration(0)
            .attr("visibility", null);
      }))
  </code></pre>