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/08/31 06:22:23 UTC

[echarts-doc] branch master updated: feat(label): label positions for polar bars apache/echarts#14616

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e2c7b00  feat(label): label positions for polar bars apache/echarts#14616
e2c7b00 is described below

commit e2c7b006535e5cf01a12d59ecca9d5c2c56f070e
Author: Ovilia <zw...@gmail.com>
AuthorDate: Tue Aug 31 14:21:53 2021 +0800

    feat(label): label positions for polar bars apache/echarts#14616
---
 en/option/series/bar.md | 41 +++++++++++++++++++++++++++++++++++++++++
 zh/option/series/bar.md | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/en/option/series/bar.md b/en/option/series/bar.md
index d6ff096..cc32c13 100644
--- a/en/option/series/bar.md
+++ b/en/option/series/bar.md
@@ -261,9 +261,50 @@ Label style configurations of single data.
 {{ use: partial-label(
     prefix = "#" + ${prefix},
     defaultPosition = "'inside'",
+    noPosition = true,
     formatter = ${topLevel}
 ) }}
 
+##${prefix} position(string|Array) = 'inside'
+
+<ExampleUIControlEnum options="top,left,right,bottom,inside,insideLeft,insideRight,insideTop,insideBottom,insideTopLeft,insideBottomLeft,insideTopRight,insideBottomRight,outside" />
+Label position.
+
+**Followings are the options: **
+
++ [x, y]
+
+    Use relative percentage, or absolute pixel values to represent position of label relative to top-left corner of bounding box.
+    For example:
+    ```js
+    // Absolute pixel values
+    position: [10, 10],
+    // Relative percentage
+    position: ['50%', '50%']
+    ```
+
++ 'top'
++ 'left'
++ 'right'
++ 'bottom'
++ 'inside'
++ 'insideLeft'
++ 'insideRight'
++ 'insideTop'
++ 'insideBottom'
++ 'insideTopLeft'
++ 'insideBottomLeft'
++ 'insideTopRight'
++ 'insideBottomRight'
+
+See: [label position](${galleryViewPath}doc-example/label-position).
+
++ Additional positions are supported for bar series under polar coordinates: `start` / `insideStart` / `middle` / `insideEnd` / `end`.
+
+~[800x500](${galleryViewPath}doc-example/bar-polar-label-radial-multiple&reset=1&edit=1)
+
+~[800x500](${galleryViewPath}doc-example/bar-polar-label-tangential-multiple&reset=1&edit=1)
+
 {{ if: ${topLevel && isNormal} }}
 ##${prefix} valueAnimation(boolean)
 
diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md
index 50b357a..a457304 100644
--- a/zh/option/series/bar.md
+++ b/zh/option/series/bar.md
@@ -339,9 +339,43 @@ option = {
 {{ use: partial-label(
     prefix = "#" + ${prefix},
     defaultPosition = "'inside'",
+    noPosition = true,
     formatter = ${topLevel}
 ) }}
 
+##${prefix} position(string|Array) = 'inside'
+
+<ExampleUIControlEnum options="top,left,right,bottom,inside,insideLeft,insideRight,insideTop,insideBottom,insideTopLeft,insideBottomLeft,insideTopRight,insideBottomRight,outside" />
+
+标签的位置。
+
++ 可以通过内置的语义声明位置:
+
+    示例:
+    ```js
+    position: 'top'
+    ```
+
+    支持:`top` / `left` / `right` / `bottom` / `inside` / `insideLeft` / `insideRight` / `insideTop` / `insideBottom` / `insideTopLeft` / `insideBottomLeft` / `insideTopRight` / `insideBottomRight`。
+
++ 也可以用一个数组表示相对的百分比或者绝对像素值表示标签相对于图形包围盒左上角的位置。
+
+    示例:
+    ```js
+    // 绝对的像素值
+    position: [10, 10],
+    // 相对的百分比
+    position: ['50%', '50%']
+    ```
+
+参见:[label position](${galleryViewPath}doc-example/label-position)。
+
++ 极坐标系柱状图除了上述取值之外,还支持:`start` / `insideStart` / `middle` / `insideEnd` / `end`。
+
+~[800x500](${galleryViewPath}doc-example/bar-polar-label-radial-multiple&reset=1&edit=1)
+
+~[800x500](${galleryViewPath}doc-example/bar-polar-label-tangential-multiple&reset=1&edit=1)
+
 {{ if: ${topLevel && isNormal} }}
 ##${prefix} valueAnimation(boolean)
 

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