title: CSS3 - Transform-origin not working on SVG element in d3.js
body: <p>I've SVG rect element, which I want use for dividing Donut into parts.</p>
  
  <p>But these rectangles(spokes) are not aligned in a straight line.</p>
  
  <p>I'm using <a href="http://d3js.org/" rel="nofollow">D3.js</a>, Please suggest if there is better way to have <strong>Spoke wheel effect</strong></p>
  
  <p><a href="http://jsfiddle.net/kmdr72wc/63/" rel="nofollow">Transform Origin on SVG element</a></p>
  
  <pre><code>rect = wheel.selectAll("g.rect")
    .data(rectData).enter()
    .append("g")
    .attr("transform",function(d,i){
       var rotate = 60*i;
       var rotX = 100, rotY = 150;
       return "translate("+rotX+","+rotY+") rotate("+rotate+")"
    })
    .attr("class","rect");
  </code></pre>
  
  <hr>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var width = 200,
    height = 300,
    innerRadius = 100,
    outerRadius = 80;
  var wheel = d3.select("#wheel")
    .append("svg")
    .attr("width", width)
    .attr("height", height)
  
  arc = d3.svg.arc()
    .innerRadius(innerRadius)
    .outerRadius(outerRadius)
    .startAngle(0)
    .endAngle(2 * Math.PI)
  
  rectData = [{
    x: width / 2,
    y: height / 2
  }, {
    x: width / 2,
    y: height / 2
  }, {
    x: width / 2,
    y: height / 2
  }, {
    x: width / 2,
    y: height / 2
  }, {
    x: width / 2,
    y: height / 2
  }, {
    x: width / 2,
    y: height / 2
  }]
  rect = wheel.selectAll("g.rect")
    .data(rectData).enter()
    .append("g")
    .attr("transform", function(d, i) {
      var rotate = 60 * i;
      var rotX = 100,
        rotY = 150;
      return "translate(" + rotX + "," + rotY + ") rotate(" + rotate + ")"
    })
    .attr("class", "rect");
  
  
  rect.append("rect")
    .attr("width", 20)
    .attr("height", outerRadius + 10)
  
  wheel.append("path").attr("d", arc)
    .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")")
    .attr("class", "donut")</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#wheel {
    margin: auto 0;
    width: 300px;
    height: 300px
  }
  #wheel .donut {
    fill: #F37E36;
  }
  #wheel rect {
    fill: #A2A931;
    transform-origin: 90 50;
  }
  #wheel .rect rect {
    transform-origin: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.js"&gt;&lt;/script&gt;
  &lt;div id="wheel"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>