Skip to content

Commit

Permalink
Merge pull request #20074 from liuyunzidian/fix-20070
Browse files Browse the repository at this point in the history
fix(pie): fix some labels may not show
  • Loading branch information
Ovilia authored Jul 18, 2024
2 parents 8e968f4 + 403dce2 commit 7a06637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chart/pie/labelLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7a06637

Please sign in to comment.