Skip to content

Commit

Permalink
fix(sunburst): gradient color update
Browse files Browse the repository at this point in the history
Interpolation method is not supported for gradient, so animation is disabled when color is gradient.

Fix and close #7569
  • Loading branch information
Ovilia committed Jan 23, 2018
1 parent b23ce3c commit 0d3906f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/chart/sunburst/SunburstPiece.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ SunburstPieceProto.updateData = function (
);
sector.useStyle(style);
}
else if (typeof style.fill === 'object' && style.fill.type
|| typeof sector.style.fill === 'object' && sector.style.fill.type
) {
// Disable animation for gradient since no interpolation method
// is supported for gradient
graphic.updateProps(sector, {
shape: sectorShape
}, seriesModel);
sector.useStyle(style);
}
else {
graphic.updateProps(sector, {
shape: sectorShape,
Expand Down

0 comments on commit 0d3906f

Please sign in to comment.