title: how to create a stacked bar chart with images in d3
body: <p>i am trying to create a stacked bar chart with images on each rectangle and it was creating images separately in the body, can someone please help me in it.
  the output of my code is showing images in an another g class i need those images to be displayed in the respective rectangles.</p>
  
  <pre><code>d3.select("body").selectAll("rect")
  .data(piedata)
  .enter()
  .append("svg:image")
  .attr("xlink:href",function(d) {return d.data.image;})
  .attr("width",50)
  .attr("height",50)
  </code></pre>
  
  <p>js link : <a href="http://jsfiddle.net/sai20/5dzpc3wn/" rel="nofollow">http://jsfiddle.net/sai20/5dzpc3wn/</a></p>