Skip to content

Commit

Permalink
Merge pull request #15309 from apache/fix-bar-middle
Browse files Browse the repository at this point in the history
fix(bar): set label to be inside when position is middle
  • Loading branch information
Ovilia authored Jul 8, 2021
2 parents d5a7424 + 2f44a15 commit 1e36890
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chart/bar/BarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,12 +981,13 @@ function updateStyle(
);

if (isPolar) {
const position = seriesModel.get(['label', 'position']);
const position = itemModel.get(['label', 'position']);
el.textConfig.inside = position === 'middle' ? true : null;
setSectorTextRotation(
el as Sector,
position === 'outside' ? labelPositionOutside : position,
createPolarPositionMapping(isHorizontalOrRadial),
seriesModel.get(['label', 'rotate'])
itemModel.get(['label', 'rotate'])
);
}

Expand Down

0 comments on commit 1e36890

Please sign in to comment.