D3.js pie chart animate counterwise
<p>As the title says. How can I reverse the animation path in a pie (D3.js). As default, the pie renders clockwise with animation. How do I reverse it?</p>

<p>See picture example.</p>

<p><a href="https://i.stack.imgur.com/6FoPj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6FoPj.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/SCaBA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SCaBA.png" alt="enter image description here"></a></p>

<p>JS here:</p>

<pre><code>    var pie = d3.layout.pie()
        .sort(null)
        .startAngle(1 * Math.PI)
        .endAngle(3 * Math.PI)
        .value(function (d) { return d.percentage; });

        g.append("path")
            .attr("d", arc)
            .style("fill", function (d) { return d.data.color; })
            .attr({
                "fill": function (d) {
                    return d.data.color;
                }
            })
            .transition()
            .duration(1000)
            .attrTween("d", function (d) {
                var i = d3.interpolate(d.startAngle, d.endAngle);
                return function (t) {
                    d.endAngle = i(t);
                    return arc(d);
                }
            });
</code></pre>