Remove pie animation

parent 83d05d4e
......@@ -265,8 +265,7 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
.attr("transform", withTransform ? "scale(0)" : $$.wrapExplode())
.style("opacity", function (d) { return d === this._current ? 0 : 1; })
.each(function () { $$.transiting = true; })
.transition().duration(duration)
.attrTween("d", function (d) {
.attr("d", function (d) {
var updated = $$.updateAngle(d), interpolate;
if (! updated) {
return function () { return "M 0 0"; };
......@@ -276,20 +275,15 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
}
interpolate = d3.interpolate(this._current, updated);
this._current = interpolate(0);
return function (t) {
var interpolated = interpolate(t);
interpolated.data = d.data; // data.id will be updated by interporator
return $$.getArc(interpolated, true);
};
var interpolated = interpolate(1);
interpolated.data = d.data; // data.id will be updated by interporator
return $$.getArc(interpolated, true);
})
.attr("transform", withTransform ? "scale(1)" : $$.wrapExplode())
.style("fill", function (d) {
return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id);
}) // Where gauge reading color would receive customization.
.style("opacity", 1)
.call($$.endall, function () {
$$.transiting = false;
});
.style("opacity", 1);
mainArc.exit().transition().duration(durationForExit)
.style('opacity', 0)
.remove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment