diff --git a/src/chart/pie/labelLayout.ts b/src/chart/pie/labelLayout.ts index 934b49cadc..5052ca236b 100644 --- a/src/chart/pie/labelLayout.ts +++ b/src/chart/pie/labelLayout.ts @@ -89,7 +89,7 @@ function adjustSingleSide( const rA = r + item.len; const rA2 = rA * rA; // Use ellipse implicit function to calculate x - const dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2); + const dx = Math.sqrt(Math.abs((1 - dy * dy / rB2) * rA2)); const newX = cx + (dx + item.len2) * dir; const deltaX = newX - item.label.x; const newTargetWidth = item.targetTextWidth - deltaX * dir;