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/09/02 15:33:40 UTC

[incubator-echarts-doc] 02/02: fix some error in docs

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

commit efcf83a5095a6f79b624519090336e343d5e2517
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Sep 2 23:30:37 2020 +0800

    fix some error in docs
---
 .gitignore                                     |  3 +-
 editor/common/parseBlocks.js                   |  2 --
 en/option/partial/item-style.md                | 12 +++----
 en/option/partial/symbol.md                    | 46 +++++++++++++-------------
 zh/option/component/data-transform-external.md |  2 +-
 zh/option/component/data-zoom-slider.md        |  2 +-
 zh/option/component/toolbox.md                 |  2 +-
 zh/option/component/x-axis.md                  |  4 +--
 zh/option/component/y-axis.md                  |  4 +--
 zh/option/partial/item-style.md                |  2 +-
 zh/option/partial/symbol.md                    |  6 ++--
 11 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9e9cda1..28eee55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -182,9 +182,10 @@ slides/webgl
 
 
 # Editor temporal files
-/editor/common/blocks.json
 /editor/server/blocks.json
 /editor/server/test
+/tool/blocks-en.json
+/tool/blocks-zh.json
 
 /zh-src
 /en-src
\ No newline at end of file
diff --git a/editor/common/parseBlocks.js b/editor/common/parseBlocks.js
index 488224a..1109d2d 100644
--- a/editor/common/parseBlocks.js
+++ b/editor/common/parseBlocks.js
@@ -343,8 +343,6 @@ module.exports.parseBlocks = async function parseBlocks(root, detailed) {
         updateBlocksLevels(target.blocks, targetsMap);
     }
 
-    fs.writeFileSync(__dirname + '/blocks.json', JSON.stringify(blocksStore, null, 2), 'utf-8');
-
     return blocksStore;
 };
 
diff --git a/en/option/partial/item-style.md b/en/option/partial/item-style.md
index a899de6..779c461 100644
--- a/en/option/partial/item-style.md
+++ b/en/option/partial/item-style.md
@@ -7,18 +7,18 @@ Graphic style of ${name}, `emphasis` is the style when it is highlighted, like b
 
 {{ target: partial-item-style }}
 
-#${prefix} color(Color{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultColor|default(null)}
+#${prefix} color(Color{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultColor|default(null)}
 
 ${name} color. {{ if: ${useColorPalatte} }} Color is taken from [option.color Palette](~color) by default. {{ /if }}
 
 {{ use: partial-color-desc() }}
 
 {{ if: ${hasCallback} }}
-Supports callback functions, in the form of:
-```js
-(params: Object) => Color
-```
-Input parameters are `seriesIndex`, `dataIndex`, `data`, `value`, and etc. of data item.
+Supports callback functions, in the form of:
+```js
+(params: Object) => Color
+```
+Input parameters are `seriesIndex`, `dataIndex`, `data`, `value`, and etc. of data item.
 {{ /if }}
 
 #${prefix} borderColor(Color) = ${defaultBorderColor|default('"#000"')}
diff --git a/en/option/partial/symbol.md b/en/option/partial/symbol.md
index c1115e8..7cb0898 100644
--- a/en/option/partial/symbol.md
+++ b/en/option/partial/symbol.md
@@ -1,43 +1,43 @@
 
 {{ target: partial-symbol }}
 
-#${prefix} symbol(string{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultSymbol}
+#${prefix} symbol(string{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultSymbol}
 
 Symbol of ${name}.
 
 {{ use: partial-icon() }}
 
 {{ if: ${hasCallback} }}
-If symbols needs to be different, you can set with callback function in the following format:
-```js
-(value: Array|number, params: Object) => string
-```
-The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
+If symbols needs to be different, you can set with callback function in the following format:
+```js
+(value: Array|number, params: Object) => string
+```
+The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
 {{ /if }}
 
-#${prefix} symbolSize(number|Array{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultSymbolSize}
+#${prefix} symbolSize(number|Array{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultSymbolSize}
 
-${name} symbol size. It can be set to single numbers like `10`, or use an array to represent width and height. For example, `[20, 10]` means symbol width is `20`, and height is`10`.
+${name} symbol size. It can be set to single numbers like `10`, or use an array to represent width and height. For example, `[20, 10]` means symbol width is `20`, and height is`10`.
 
 {{ if: ${hasCallback} }}
-If size of symbols needs to be different, you can set with callback function in the following format:
-```js
-(value: Array|number, params: Object) => number|Array
-```
-The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
+If size of symbols needs to be different, you can set with callback function in the following format:
+```js
+(value: Array|number, params: Object) => number|Array
+```
+The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
 {{ /if }}
 
-#${prefix} symbolRotate(number{{ if: ${hasCallback} }}|Function{{ /if }})(*)
+#${prefix} symbolRotate(number{{ if: ${hasCallback} }}|Function{{ /if }})
 
-Rotate degree of ${name} symbol. The negative value represents clockwise. Note that when `symbol` is set to be `'arrow'` in `markLine`, `symbolRotate` value will be ignored, and compulsively use tangent angle.
+Rotate degree of ${name} symbol. The negative value represents clockwise. Note that when `symbol` is set to be `'arrow'` in `markLine`, `symbolRotate` value will be ignored, and compulsively use tangent angle.
 
 {{ if: ${hasCallback} }}
-If rotation of symbols needs to be different, you can set with callback function in the following format:
-```js
-(value: Array|number, params: Object) => number
-```
-The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
-> Callback is supported since 4.8.0 .
+If rotation of symbols needs to be different, you can set with callback function in the following format:
+```js
+(value: Array|number, params: Object) => number
+```
+The first parameter `value` is the value in [data](~series-${seriesType}.data), and the second parameter `params` is the rest parameters of data item.
+> Callback is supported since 4.8.0 .
 {{ /if }}
 
 #${prefix} symbolKeepAspect(boolean) = false
@@ -46,7 +46,7 @@ Whether to keep aspect for symbols in the form of `path://`.
 
 #${prefix} symbolOffset(Array) = [0, 0]
 
-Offset of ${name} symbol relative to original position. By default, symbol will be put in the center position of data. But if symbol is from user-defined vector path or image, you may not expect symbol to be in center. In this case, you may use this attribute to set offset to default position. It can be in absolute pixel value, or in relative percentage value.
-
+Offset of ${name} symbol relative to original position. By default, symbol will be put in the center position of data. But if symbol is from user-defined vector path or image, you may not expect symbol to be in center. In this case, you may use this attribute to set offset to default position. It can be in absolute pixel value, or in relative percentage value.
+
 For example, `[0, '50%']` means to move upside side position of symbol height. It can be used to make the arrow in the bottom to be at data position when symbol is pin.
 
diff --git a/zh/option/component/data-transform-external.md b/zh/option/component/data-transform-external.md
index 33467a2..4362f8b 100644
--- a/zh/option/component/data-transform-external.md
+++ b/zh/option/component/data-transform-external.md
@@ -13,7 +13,7 @@
 
 外部数据转换器须有名空间(如 `type: 'ecStat:regression'`)。
 
-### config(*)
+### config(Object)
 
 这里设置每个数据转换器所须的参数。每种数据转换器有自己的参数格式定义。
 
diff --git a/zh/option/component/data-zoom-slider.md b/zh/option/component/data-zoom-slider.md
index 85fe307..24b10c3 100644
--- a/zh/option/component/data-zoom-slider.md
+++ b/zh/option/component/data-zoom-slider.md
@@ -164,7 +164,7 @@ labelFormatter: function (value) {
 
 拖动时,是否实时更新系列的视图。如果设置为 `false`,则只在拖拽结束的时候更新。
 
-## textStyle(*)
+## textStyle(Object)
 
 {{ use: partial-simple-text-style(
     prefix = '##',
diff --git a/zh/option/component/toolbox.md b/zh/option/component/toolbox.md
index 93b2261..e48f9d7 100644
--- a/zh/option/component/toolbox.md
+++ b/zh/option/component/toolbox.md
@@ -64,7 +64,7 @@ ${name} icon 样式设置。由于 icon 的文本信息只在 icon hover 时候
 
 #### title(boolean) = '${title}'
 
-#### icon(*)
+#### icon(string)
 
 {{ use: partial-icon-image-path() }}
 
diff --git a/zh/option/component/x-axis.md b/zh/option/component/x-axis.md
index c743a72..0f71bb9 100644
--- a/zh/option/component/x-axis.md
+++ b/zh/option/component/x-axis.md
@@ -74,13 +74,13 @@ x 轴的位置。
 
 X 轴相对于默认位置的偏移,在相同的 `position` 上有多个 X 轴的时候有用。
 
-## realtimeSort(*) = false
+## realtimeSort(boolean) = false
 
 用于制作动态排序柱状图。设为 `true` 时,表示 X 轴开启实时排序效果,仅当 X 轴的 [type](~xAxis.type) 是 `'value'` 时有效。
 
 需要配合其他配置项共同实现动态排序柱状图效果,具体参见[动态排序柱状图](tutorial.html#%E5%8A%A8%E6%80%81%E6%8E%92%E5%BA%8F%E6%9F%B1%E7%8A%B6%E5%9B%BE)教程。
 
-## sortSeriesIndex(*) = 0
+## sortSeriesIndex(number) = 0
 
 动态排序柱状图用于排序的系列 id。目前只支持一个系列的柱状图排序效果,所以这个值只能取 0。仅当 X 轴 [realtimeSort](~xAxis.realtimeSort) 为 `true` 并且 [type](~xAxis.type) 是 `'value'` 时有效。
 
diff --git a/zh/option/component/y-axis.md b/zh/option/component/y-axis.md
index 1742723..0d7fe78 100644
--- a/zh/option/component/y-axis.md
+++ b/zh/option/component/y-axis.md
@@ -118,13 +118,13 @@ y 轴的位置。
 
 Y 轴相对于默认位置的偏移,在相同的 `position` 上有多个 Y 轴的时候有用。
 
-## realtimeSort(*) = false
+## realtimeSort(boolean) = false
 
 用于制作动态排序柱状图。设为 `true` 时,表示 Y 轴开启实时排序效果,仅当 X 轴的 [type](~yAxis.type) 是 `'value'` 时有效。
 
 需要配合其他配置项共同实现动态排序柱状图效果,具体参见[动态排序柱状图](tutorial.html#%E5%8A%A8%E6%80%81%E6%8E%92%E5%BA%8F%E6%9F%B1%E7%8A%B6%E5%9B%BE)教程。
 
-## sortSeriesIndex(*) = 0
+## sortSeriesIndex(number) = 0
 
 动态排序柱状图用于排序的系列 id。目前只支持一个系列的柱状图排序效果,所以这个值只能取 0。仅当 Y 轴 [realtimeSort](~yAxis.realtimeSort) 为 `true` 并且 [type](~yAxis.type) 是 `'value'` 时有效。
 
diff --git a/zh/option/partial/item-style.md b/zh/option/partial/item-style.md
index df9676f..2fa7727 100644
--- a/zh/option/partial/item-style.md
+++ b/zh/option/partial/item-style.md
@@ -7,7 +7,7 @@ ${name} 图形样式。
 
 {{ target: partial-item-style }}
 
-#${prefix} color(Color{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultColor|default('自适应')}
+#${prefix} color(Color{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultColor|default('自适应')}
 
 <ExampleUIControlColor />
 
diff --git a/zh/option/partial/symbol.md b/zh/option/partial/symbol.md
index 913d7cc..4253d7a 100644
--- a/zh/option/partial/symbol.md
+++ b/zh/option/partial/symbol.md
@@ -1,7 +1,7 @@
 
 {{ target: partial-symbol }}
 
-#${prefix} symbol(string{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultSymbol}
+#${prefix} symbol(string{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultSymbol}
 
 <ExampleUIControlIcon default="circle" />
 
@@ -17,7 +17,7 @@ ${name}标记的图形。
 其中第一个参数 `value` 为 [data](~series-${seriesType}.data) 中的数据值。第二个参数`params` 是其它的数据项参数。
 {{ /if }}
 
-#${prefix} symbolSize(number|Array{{ if: ${hasCallback} }}|Function{{ /if }})(*) = ${defaultSymbolSize}
+#${prefix} symbolSize(number|Array{{ if: ${hasCallback} }}|Function{{ /if }}) = ${defaultSymbolSize}
 
 <ExampleUIControlNumber min="0" />
 
@@ -31,7 +31,7 @@ ${name}标记的大小,可以设置成诸如 `10` 这样单一的数字,也
 其中第一个参数 `value` 为 [data](~series-${seriesType}.data) 中的数据值。第二个参数`params` 是其它的数据项参数。
 {{ /if }}
 
-#${prefix} symbolRotate(number{{ if: ${hasCallback} }}|Function{{ /if }})(*)
+#${prefix} symbolRotate(number{{ if: ${hasCallback} }}|Function{{ /if }})
 
 <ExampleUIControlAngle min="-180" max="180" step="1" />
 


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