You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/08/18 03:58:08 UTC
[incubator-echarts-doc] branch next updated: label(zh): add
overflow option in label.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git
The following commit(s) were added to refs/heads/next by this push:
new 54ff66f label(zh): add overflow option in label.
54ff66f is described below
commit 54ff66f674e220c6b608aeb1feabb51d6fc46734
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Aug 18 11:57:53 2020 +0800
label(zh): add overflow option in label.
---
en/option/series/treemap.md | 12 ++++--------
zh/option/partial/label-layout.md | 8 ++++++++
zh/option/partial/label.md | 10 ----------
zh/option/partial/text-style.md | 29 +++++++++++++++++++++++++++++
zh/option/series/treemap.md | 12 ++++--------
5 files changed, 45 insertions(+), 26 deletions(-)
diff --git a/en/option/series/treemap.md b/en/option/series/treemap.md
index fbcdbb1..3b38f09 100644
--- a/en/option/series/treemap.md
+++ b/en/option/series/treemap.md
@@ -530,8 +530,7 @@ This can hide the details of nodes when the rectangular area is not large enough
{{use:partial-label(
prefix=${prefix} + "#",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
@@ -556,8 +555,7 @@ See:
{{use:partial-label(
prefix=${prefix} + "#",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
##${prefix} height(number) = 20
@@ -582,15 +580,13 @@ Height of label area.
{{use:partial-label(
prefix=${prefix} + "##",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
##${prefix} upperLabel(Object)
{{use:partial-label(
prefix=${prefix} + "##",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
##${prefix} itemStyle(Object)
{{use: partial-treemap-item-style(
diff --git a/zh/option/partial/label-layout.md b/zh/option/partial/label-layout.md
index 8111b6c..1babaa8 100644
--- a/zh/option/partial/label-layout.md
+++ b/zh/option/partial/label-layout.md
@@ -88,6 +88,14 @@ labelLayout(params) {
标签旋转角度。
+#${prefix} width(number)
+
+标签显示的宽度。可以配合`overflow`使用控制标签显示在固定宽度内
+
+#${prefix} height(number)
+
+标签显示的高度。可以配合`lineOverflow`使用控制标签显示在固定高度内
+
#${prefix} align(string)
标签水平对齐。可以设置`'left'`, `'center'`, `'right'`。
diff --git a/zh/option/partial/label.md b/zh/option/partial/label.md
index bf0582a..61dae82 100644
--- a/zh/option/partial/label.md
+++ b/zh/option/partial/label.md
@@ -67,16 +67,6 @@ ${name}图形上的文本标签,可用于说明图形的一些数据信息,
) }}
{{ /if }}
-
-{{ if: ${ellipsis} }}
-#${prefix} ellipsis(boolean) = true
-
-<ExampleUIControlBoolean />
-
-当文字超出的时候,是否超出部分替换为省略号。
-{{ /if }}
-
-
{{ target:partial-label-position }}
标签的位置。
diff --git a/zh/option/partial/text-style.md b/zh/option/partial/text-style.md
index 8ebe759..7a3538c 100644
--- a/zh/option/partial/text-style.md
+++ b/zh/option/partial/text-style.md
@@ -32,6 +32,35 @@
enableAutoColor=${enableAutoColor}
)}}
+#${prefix} width(number)
+
+文本显示宽度。
+
+#${prefix} height(number)
+
+文本显示高度。
+
+
+#${prefix} overflow(string) = 'none'
+
+<ExampleUIControlEnum options="truncate,break,breakAll" />
+
+文字超出宽度是否截断或者换行。配置`width`时有效
+
++ `'truncate'` 截断,并在末尾显示`ellipsis`配置的文本,默认为`...`
++ `'break'` 换行
++ `'breakAll'` 换行,跟`'break'`不同的是,在英语等拉丁文中,`'breakAll'`还会强制单词内换行
+
+#${prefix} ellipsis(string) = '...'
+
+在`overflow`配置为`'truncate'`的时候,可以通过该属性配置末尾显示的文本。
+
+#${prefix} lineOverflow(string) = 'none'
+
+文本超出高度部分是否截断,配置`height`时有效。
+
++ `'truncate'` 在文本行数超出高度部分截断。
+
{{ if: !${noRich} }}
#${prefix} rich(Object)
diff --git a/zh/option/series/treemap.md b/zh/option/series/treemap.md
index 0d46964..6e90096 100644
--- a/zh/option/series/treemap.md
+++ b/zh/option/series/treemap.md
@@ -693,8 +693,7 @@ treemap 默认把第一个维度(Array 第一项)映射到『面积』上。
{{use:partial-label(
prefix=${prefix} + "#",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
#${prefix} upperLabel(Object)
@@ -717,8 +716,7 @@ treemap 默认把第一个维度(Array 第一项)映射到『面积』上。
{{use:partial-label(
prefix=${prefix} + "#",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
###${prefix} height(number) = 20
@@ -744,15 +742,13 @@ treemap 默认把第一个维度(Array 第一项)映射到『面积』上。
{{use:partial-label(
prefix=${prefix} + "##",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
##${prefix} upperLabel(Object)
{{use:partial-label(
prefix=${prefix} + "##",
defaultPosition="'inside'",
- formatter=true,
- ellipsis=true
+ formatter=true
)}}
##${prefix} itemStyle(Object)
{{use: partial-treemap-item-style(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org