Skip to content

Commit

Permalink
Merge pull request #17412 from apache/fix-pie-labelLine
Browse files Browse the repository at this point in the history
fix(pie): fix `labelLine` may not be hidden when `minShowLabelRadian` is specified
  • Loading branch information
Ovilia committed Jul 22, 2022
2 parents 800fcca + d5ee24d commit 67afcbd
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/chart/pie/labelLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ export default function pieLabelLayout(

if (Math.abs(sectorShape.endAngle - sectorShape.startAngle) < minShowLabelRadian) {
each(label.states, setNotShow);
label.ignore = true;
each(labelLine.states, setNotShow);
label.ignore = labelLine.ignore = true;
return;
}

Expand Down
120 changes: 118 additions & 2 deletions test/pie-label.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/__meta__.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/pie-label.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 67afcbd

Please sign in to comment.