diff --git a/src/models/pie.js b/src/models/pie.js index 9e39c9dea..c865aa411 100644 --- a/src/models/pie.js +++ b/src/models/pie.js @@ -28,6 +28,7 @@ nv.models.pie = function() { , endAngle = false , cornerRadius = 0 , donutRatio = 0.5 + , duration = 250 , arcsRadius = [] , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout', 'elementMousemove', 'renderEnd') ; @@ -210,6 +211,7 @@ nv.models.pie = function() { slices.select('path') .transition() + .duration(duration) .attr('d', function (d, i) { return arcs[i](d); }) .attrTween('d', arcTween); @@ -414,6 +416,10 @@ nv.models.pie = function() { margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom; margin.left = typeof _.left != 'undefined' ? _.left : margin.left; }}, + duration: {get: function(){return duration;}, set: function(_){ + duration = _; + renderWatch.reset(duration); + }}, y: {get: function(){return getY;}, set: function(_){ getY=d3.functor(_); }}, diff --git a/src/models/pieChart.js b/src/models/pieChart.js index b75027321..86d28f45d 100644 --- a/src/models/pieChart.js +++ b/src/models/pieChart.js @@ -232,6 +232,7 @@ nv.models.pieChart = function() { duration: {get: function(){return duration;}, set: function(_){ duration = _; renderWatch.reset(duration); + pie.duration(duration); }}, margin: {get: function(){return margin;}, set: function(_){ margin.top = _.top !== undefined ? _.top : margin.top;