You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2021/07/08 03:31:21 UTC

[echarts] 01/01: fix(bar): set label to be inside when position is middle

This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch fix-bar-middle
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit eba8fb4ad1641e833c7c8f3f5707d335fb853719
Author: Ovilia <zw...@gmail.com>
AuthorDate: Thu Jul 8 11:30:20 2021 +0800

    fix(bar): set label to be inside when position is middle
---
 src/chart/bar/BarView.ts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts
index 521da0e..f5dba92 100644
--- a/src/chart/bar/BarView.ts
+++ b/src/chart/bar/BarView.ts
@@ -982,6 +982,9 @@ function updateStyle(
 
     if (isPolar) {
         const position = seriesModel.get(['label', 'position']);
+        if (position === 'middle') {
+            el.textConfig.inside = true;
+        }
         setSectorTextRotation(
             el as Sector,
             position === 'outside' ? labelPositionOutside : position,

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org