You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2019/11/06 06:38:32 UTC

[incubator-echarts-doc] 01/01: fix: option/title、option/texe-style of doc

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

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

commit 91057cd2465b91ea282c541608c8d1f9409da231
Author: Wdingding <wa...@gmail.com>
AuthorDate: Wed Nov 6 14:38:16 2019 +0800

    fix: option/title、option/texe-style of doc
---
 zh/option/component/title.md    |  42 ++++++++--------
 zh/option/partial/text-style.md | 103 ++++++++++++++++++++--------------------
 2 files changed, 75 insertions(+), 70 deletions(-)

diff --git a/zh/option/component/title.md b/zh/option/component/title.md
index c9c34ac..ce4dbf3 100644
--- a/zh/option/component/title.md
+++ b/zh/option/component/title.md
@@ -4,36 +4,35 @@
 
 # title(Object)
 
-标题组件,包含主标题和副标题。
+图表的标题组件,包含主标题和副标题。
 
-在 ECharts 2.x 中单个 ECharts 实例最多只能拥有一个标题组件。但是在 ECharts 3 中可以存在任意多个标题组件,这在需要标题进行排版,或者单个实例中的多个图表都需要标题时会比较有用。
+在 ECharts 中可以使用任意多个标题组件。在需要对标题进行排版,或者单个实例中的多个图表都需要使用标题时都会比较有用。(注意,在 ECharts 2.x 中,单个 ECharts 实例中最多只能有一个标题组件。)
 
-**例如下面不同缓动函数效果的示例,每一个缓动效果图都带有一个标题组件:**
+例如,在下面不同缓动函数效果的示例中,每一个缓动效果的图表都带有一个标题组件:
 ~[700x400](${galleryViewPath}line-easing&edit=1&reset=1)
 
 {{use: partial-component-id(prefix="#")}}
 
 ## show(boolean) = true
 
-是否显示标题组件。
+是否显示标题组件。默认为显示,若不想显示标题可将 show 设为 false。
 
 ## text(string) = ''
 
-主标题文本,支持使用 `\n` 换行。
+主标题文本。文本支持使用 `\n` 换行。
 
 ## link(string) = ''
 
-主标题文本超链接。
+主标题文本的超链接。
 
 ## target(string) = 'blank'
 
-指定窗口打开主标题超链接。
+指定在哪个窗口打开主标题文本的超链接。
 
 **可选:**
 
-+ `'self'` 当前窗口打开
-
-+ `'blank'` 新窗口打开
++ `'self'` 使用当前窗口打开链接。
++ `'blank'` 在新窗口中打开链接。
 
 ## textStyle
 
@@ -56,16 +55,17 @@
 
 ## sublink(string) = ''
 
-副标题文本超链接。
+副标题文本的超链接。
 
 
 ## subtarget(string) = 'blank'
 
-指定窗口打开副标题超链接,可选:
+指定在哪个窗口打开副标题文本的超链接。
 
-+ `'self'` 当前窗口打开
+**可选:**
 
-+ `'blank'` 新窗口打开
++ `'self'` 使用当前窗口打开链接。
++ `'blank'` 在新窗口中打开链接。
 
 
 ## subtextStyle
@@ -80,15 +80,19 @@
 
 ## textAlign(string) = 'auto'
 
-整体(包括 text 和 subtext)的水平对齐。
+整体文本(包括 text 和 subtext)水平对齐。
+
+**可选:**
 
-可选值:`'auto'`、`'left'`、`'right'`、`'center'`。
+`'auto'`、`'left'`、`'right'`、`'center'`。
 
 ## textVerticalAlign(string) = 'auto'
 
-整体(包括 text 和 subtext)的垂直对齐。
+整体文本(包括 text 和 subtext)垂直对齐。
+
+**可选:**
 
-可选值:`'auto'`、`'top'`、`'bottom'`、`'middle'`。
+`'auto'`、`'top'`、`'bottom'`、`'middle'`。
 
 ## triggerEvent(boolean) = false
 
@@ -100,7 +104,7 @@
 
 ## itemGap(number) = 10
 
-主副标题之间的间距。
+主标题和副标题之间的间距。
 
 {{use: partial-rect-layout(componentName="grid ")}}
 
diff --git a/zh/option/partial/text-style.md b/zh/option/partial/text-style.md
index c6d02d2..d64a1fb 100644
--- a/zh/option/partial/text-style.md
+++ b/zh/option/partial/text-style.md
@@ -96,7 +96,7 @@ label: {
 
 #${prefix} color(Color)=${defaultColor|default('"#fff"')}
 
-${name}文字的颜色。
+${name}文本的颜色。
 
 
 {{if: ${enableAutoColor} }}
@@ -106,46 +106,46 @@ ${name}文字的颜色。
 
 #${prefix} fontStyle(string)='normal'
 
-${name}文字字体的风格
+${name}文本字体的样式。
 
 可选:
-+ `'normal'`
-+ `'italic'`
-+ `'oblique'`
++ `'normal'` 正常的字体。
++ `'italic'` 斜体,如果当前字体无可用的斜体版本,会选用倾斜体 (oblique) 替代。
++ `'oblique'` 倾斜体,如果当前字体无可用的斜体版本,会选用斜体 (italic) 替代。
 
 
 #${prefix} fontWeight(string)=${defaultFontWeight|default('normal')}
 
-${name}文字字体的粗细
+${name}字体的粗细。
 
-可选:
-+ `'normal'`
-+ `'bold'`
-+ `'bolder'`
-+ `'lighter'`
-+ 100 | 200 | 300 | 400...
+**可选:**
++ `'normal'` 默认值。正常粗细的字体。与 400 等值。
++ `'bold'` 加粗的字体。与 700 等值。
++ `'bolder'` 比正常字体更粗。
++ `'lighter'` 比正常字体更细。
++ 100 | 200 | 300 | 400... 更大的数值代表更粗的字体重量。400 等同于 normal 正常粗细。
 
 
 #${prefix} fontFamily(string)='sans-serif'
 
-${name}文字的字体系列
+${name}文本的字体系列。
 
 还可以是 'serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...
 
 #${prefix} fontSize(number)=${defaultFontSize|default(12)}
 
-${name}文字的字体大小
+${name}文本的字体大小
 
 
  {{ if: !${noAlign} }}
 #${prefix} align(string)=${defaultAlign}
 
-文字水平对齐方式,默认自动。
+文本的水平的对齐方式,默认为自动。
 
-可选:
-+ `'left'`
-+ `'center'`
-+ `'right'`
+**可选:**
++ `'left'` 文本在其左边缘对齐。
++ `'center'` 文本水平居中。
++ `'right'` 文本在其右边缘对齐。
 
 {{ use: partial-text-style-rich-inherit(
     name='align',
@@ -157,12 +157,12 @@ ${name}文字的字体大小
 {{ if: !${noVerticalAlign} }}
 #${prefix} verticalAlign(string)=${defaultVerticalAlign}
 
-文字垂直对齐方式,默认自动。
+文本的垂直的对齐方式,默认为自动。
 
-可选:
-+ `'top'`
-+ `'middle'`
-+ `'bottom'`
+**可选:**
++ `'top'` 文本在其顶部边缘对齐。
++ `'middle'` 文本垂直居中。
++ `'bottom'` 文本在其底部边缘对齐。
 
 {{ use: partial-text-style-rich-inherit(
     name='verticalAlign',
@@ -175,7 +175,7 @@ ${name}文字的字体大小
 
 #${prefix} lineHeight(number)
 
-行高。
+多行文本的行高间距。
 
 {{ use: partial-text-style-rich-inherit(
     name='lineHeight',
@@ -186,11 +186,11 @@ ${name}文字的字体大小
 
 #${prefix} backgroundColor(string|Object)='transparent'
 
-文字块背景色。
+文本的背景色。
 
-可以是直接的颜色值,例如:`'#123234'`, `'red'`, `'rgba(0,23,11,0.3)'`。
+属性的值可以为颜色值,例如:`'#123234'`, `'red'`, `'rgba(0,23,11,0.3)'`。
 
-可以支持使用图片,例如:
+也支持使用图片作为背景,例如:
 
 ```js
 backgroundColor: {
@@ -202,7 +202,7 @@ backgroundColor: {
 }
 ```
 
-当使用图片的时候,可以使用 `width` 或 `height` 指定高宽,也可以不指定自适应。
+当使用图片时,可以用 `width` 或 `height` 来指定背景图片的高、宽。如果不指定,图片则会自适应。
 
 {{if: ${enableAutoColor} }}
 {{ use: partial-text-style-auto-color-desc }}
@@ -210,7 +210,7 @@ backgroundColor: {
 
 #${prefix} borderColor(string)='transparent'
 
-文字块边框颜色。
+文字块的边框颜色。
 
 {{if: ${enableAutoColor} }}
 {{ use: partial-text-style-auto-color-desc }}
@@ -218,7 +218,7 @@ backgroundColor: {
 
 #${prefix} borderWidth(number)=0
 
-文字块边框宽度。
+文字块的边框宽度。
 
 #${prefix} borderRadius(number|Array)=0
 
@@ -226,54 +226,55 @@ backgroundColor: {
 
 #${prefix} padding(number|Array)=0
 
-文字块的内边距。例如:
+文字块的内边距。
 
+**例如:**
 + `padding: [3, 4, 5, 6]`:表示 `[上, 右, 下, 左]` 的边距。
-+ `padding: 4`:表示 `padding: [4, 4, 4, 4]`。
-+ `padding: [3, 4]`:表示 `padding: [3, 4, 3, 4]`。
++ `padding: 4`:表示 `padding: [4, 4, 4, 4]`,即四个边的内边距都为 4。
++ `padding: [3, 4]`:表示 `padding: [3, 4, 3, 4]`,即第一个值为上下两边的内边距,第二个值为左右两边的内边距。
 
-注意,文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
+**注意:**文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
 
 #${prefix} shadowColor(string)='transparent'
 
-文字块的背景阴影颜色。
+文字块阴影的颜色。
 
 #${prefix} shadowBlur(number)=0
 
-文字块的背景阴影长度。
+文字块阴影的长度。
 
 #${prefix} shadowOffsetX(number)=0
 
-文字块的背景阴影 X 偏移。
+文字块阴影在 X (水平)方向的偏移量。
 
 #${prefix} shadowOffsetY(number)=0
 
-文字块的背景阴影 Y 偏移。
+文字块阴影在 Y (垂直)方向的偏移量。
 
 {{ /if }}
 
 
 #${prefix} width(number|string)
 
-文字块的宽度。一般不用指定,不指定则自动是文字的宽度。在想做表格项或者使用图片(参见 `backgroundColor`)时,可能会使用它。
+文字块的宽度。一般不用指定,自动显示为文字的宽度。在需要表格项或者使用图片(参见 `backgroundColor`)时,可能会使用指定它。
 
-注意,文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
+**注意:**文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
 
-`width` 也可以是百分比字符串,如 `'100%'`。表示的是所在文本块的 `contentWidth`(即不包含文本块的 `padding`)的百分之多少。之所以以 `contentWidth` 做基数,因为每个文本片段只能基于 `content box` 布局。如果以 `outerWidth` 做基数,则百分比的计算在实用中不具有意义,可能会超出。
+`width` 也可以是百分比字符串,如 `'100%'`。表示的是所在文本块的 `contentWidth`(即不包含文本块的 `padding`)的百分之多少。之所以用 `contentWidth` 做基数,因为每个文本片段只能基于 `content box` 布局。如果以 `outerWidth` 做基数,则百分比的计算在实用中不具有意义,可能会超出。
 
-注意,如果不定义 `rich` 属性,则不能指定 `width` 和 `height`。
+**注意:**如果不定义 `rich` 属性,则不能指定 `width` 和 `height`。
 
 #${prefix} height(number|string)
 
 文字块的高度。一般不用指定,不指定则自动是文字的高度。在使用图片(参见 `backgroundColor`)时,可能会使用它。
 
-注意,文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
+**注意:**文字块的 `width` 和 `height` 指定的是内容高宽,不包含 `padding`。
 
-注意,如果不定义 `rich` 属性,则不能指定 `width` 和 `height`。
+**注意:**如果不定义 `rich` 属性,则不能指定 `width` 和 `height`。
 
 #${prefix} textBorderColor(string)='transparent'
 
-文字本身的描边颜色。
+文字描边的颜色。
 
 {{if: ${enableAutoColor} }}
 {{ use: partial-text-style-auto-color-desc }}
@@ -281,23 +282,23 @@ backgroundColor: {
 
 #${prefix} textBorderWidth(number)=0
 
-文字本身的描边宽度。
+文字描边的宽度。
 
 #${prefix} textShadowColor(string)='transparent'
 
-文字本身的阴影颜色。
+文字阴影的颜色。
 
 #${prefix} textShadowBlur(number)=0
 
-文字本身的阴影长度。
+文字阴影的长度。
 
 #${prefix} textShadowOffsetX(number)=0
 
-文字本身的阴影 X 偏移。
+文字阴影在 X (水平)方向的偏移量。
 
 #${prefix} textShadowOffsetY(number)=0
 
-文字本身的阴影 Y 偏移。
+文字阴影在 Y (垂直)方向的偏移量。
 
 
 


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