From 4f2c31bf25048a91bd71b7b9a2d599f3f0ba0cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Stillesj=C3=B6?= Date: Thu, 2 Jun 2016 10:55:13 +0200 Subject: [PATCH] Only interpolate angles, not data, when updating label paths. --- src/pie-chart.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pie-chart.js b/src/pie-chart.js index e6c5bf527..69e935eac 100644 --- a/src/pie-chart.js +++ b/src/pie-chart.js @@ -214,8 +214,9 @@ dc.pieChart = function (parent, chartGroup) { polyline.exit().remove(); dc.transition(polyline, _chart.transitionDuration()) .attrTween('points', function (d) { - this._current = this._current || d; - var interpolate = d3.interpolate(this._current, d); + var current = this._current || d; + current = {startAngle: current.startAngle, endAngle: current.endAngle}; + var interpolate = d3.interpolate(current, d); this._current = interpolate(0); return function (t) { var arc2 = d3.svg.arc()