Skip to content

Commit 7a06637

Browse files
authored
Merge pull request #20074 from liuyunzidian/fix-20070
fix(pie): fix some labels may not show
2 parents 8e968f4 + 403dce2 commit 7a06637

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chart/pie/labelLayout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function adjustSingleSide(
8989
const rA = r + item.len;
9090
const rA2 = rA * rA;
9191
// Use ellipse implicit function to calculate x
92-
const dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2);
92+
const dx = Math.sqrt(Math.abs((1 - dy * dy / rB2) * rA2));
9393
const newX = cx + (dx + item.len2) * dir;
9494
const deltaX = newX - item.label.x;
9595
const newTargetWidth = item.targetTextWidth - deltaX * dir;

0 commit comments

Comments
 (0)