title: Zoom & Brush in Stacked Area Chart
body: <p>Playing with Mike's <a href="https://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172" rel="nofollow noreferrer">Zoom &amp; Brush</a>. How to change this when my area is stacked? In this case I use layer function</p>
  
  <pre><code>var layer = svg.selectAll(".layer")
    .data(stack(values))
    .enter().append("g").append("path")
      .attr("class", "layer")
      .attr("transform", "translate(" + margin.left + "," + margin.top + ")")
      .style("fill", (d,i) =&gt; d3.color(colors[i]))
      .attr("d", area);
  </code></pre>
  
  <p>But how redraw chart after zoom? What instead </p>
  
  <pre><code>focus.append("path")
    .datum(values)
    .attr("class", "area")
    .attr("d", area);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>focus.select(".area").attr("d", area);
  </code></pre>
  
  <p>?</p>