diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts index 0de06c481f..5445a1defc 100644 --- a/src/chart/bar/BarView.ts +++ b/src/chart/bar/BarView.ts @@ -803,7 +803,7 @@ const elementCreator: { const sectorShape = sector.shape; const animateProperty = isRadial ? 'r' : 'endAngle' as 'r' | 'endAngle'; const animateTarget = {} as SectorShape; - sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle; + sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle; animateTarget[animateProperty] = layout[animateProperty]; (isUpdate ? updateProps : initProps)(sector, { shape: animateTarget diff --git a/src/chart/sunburst/SunburstPiece.ts b/src/chart/sunburst/SunburstPiece.ts index 873a686f17..91ac0f4559 100644 --- a/src/chart/sunburst/SunburstPiece.ts +++ b/src/chart/sunburst/SunburstPiece.ts @@ -116,7 +116,7 @@ class SunburstPiece extends graphic.Sector { if (firstCreate) { sector.setShape(sectorShape); sector.shape.r = layout.r0; - graphic.updateProps( + graphic.initProps( sector, { shape: { diff --git a/test/bar-polar-animation.html b/test/bar-polar-animation.html new file mode 100644 index 0000000000..4b6f698147 --- /dev/null +++ b/test/bar-polar-animation.html @@ -0,0 +1,131 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index 8a4a0c0b36..812e7da82d 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -22,6 +22,7 @@ "bar-label-rotation": 2, "bar-large": 2, "bar-overflow-time-plot": 3, + "bar-polar-animation": 2, "bar-polar-clockwise": 1, "bar-polar-multi-series": 1, "bar-polar-multi-series-radial": 1, diff --git a/test/runTest/actions/bar-polar-animation.json b/test/runTest/actions/bar-polar-animation.json new file mode 100644 index 0000000000..1eb0c95558 --- /dev/null +++ b/test/runTest/actions/bar-polar-animation.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousemove","time":430,"x":572,"y":200},{"type":"mousemove","time":629,"x":533,"y":202},{"type":"mousemove","time":829,"x":491,"y":213},{"type":"mousemove","time":1029,"x":477,"y":214},{"type":"mousemove","time":1229,"x":467,"y":218},{"type":"mousemove","time":1395,"x":467,"y":218},{"type":"mousemove","time":1595,"x":492,"y":204},{"type":"mousemove","time":1796,"x":538,"y":187},{"type":"mousemove","time":1996,"x":581,"y":227},{"type":"mousemove","time":2202,"x":531,"y":327},{"type":"mousemove","time":2412,"x":471,"y":348},{"type":"mousemove","time":2612,"x":456,"y":337},{"type":"mousemove","time":2812,"x":438,"y":320},{"type":"mousemove","time":3012,"x":432,"y":313},{"type":"mousemove","time":3212,"x":454,"y":340},{"type":"mousemove","time":3412,"x":502,"y":366},{"type":"mousemove","time":3612,"x":529,"y":376},{"type":"mousemove","time":3817,"x":532,"y":378}],"scrollY":0,"scrollX":0,"timestamp":1669801169309},{"name":"Action 2","ops":[{"type":"mousemove","time":287,"x":510,"y":358},{"type":"mousemove","time":488,"x":492,"y":365},{"type":"mousemove","time":703,"x":555,"y":353},{"type":"mousemove","time":903,"x":591,"y":351},{"type":"mousemove","time":1110,"x":593,"y":352}],"scrollY":317,"scrollX":0,"timestamp":1669801208534}] \ No newline at end of file