Skip to content

Commit

Permalink
fix(pie): fix some labels may not show #20074
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyu committed Jul 9, 2024
1 parent 769bfef commit 403dce2
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(Math.abs((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 403dce2

Please sign in to comment.