Skip to content

Commit 47d157f

Browse files
committed
fix sunburst tweening to work with new d3-interpolate
1 parent 33eac12 commit 47d157f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/traces/sunburst/plot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ function plotOne(gd, cd, element, transitionOpts) {
308308
// if pt to remove:
309309
// - if 'below' where the root-node used to be: shrink it radially inward
310310
// - otherwise, collapse it clockwise or counterclockwise which ever is shortest to theta=0
311-
next = pt.rpx1 < entryPrev.rpx1 ? {rpx0: 0, rpx1: 0} : {x0: a, x1: a};
311+
next = pt.rpx1 < entryPrev.rpx1 ?
312+
{x0: pt.x0, x1: pt.x1, rpx0: 0, rpx1: 0} :
313+
{x0: a, x1: a, rpx0: pt.rpx0, rpx1: pt.rpx1};
312314
} else {
313315
// this happens when maxdepth is set, when leaves must
314316
// be removed and the rootPt is new (i.e. does not have a 'prev' object)

0 commit comments

Comments
 (0)