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

sushuang 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 145e8a9  fix: add missing doc for data-transform
     new a8d3952  Merge branch 'next' of 
github.com:apache/incubator-echarts-doc into next
145e8a9 is described below

commit 145e8a9f9dc5dffaa1750a186d5738460397518e
Author: 100pah <sushuang0...@gmail.com>
AuthorDate: Tue Aug 25 21:39:31 2020 +0800

    fix: add missing doc for data-transform
---
 en/option/component/dataset.md | 21 +++++++++++++++++++++
 en/tutorial/data-transform.md  | 14 ++++++++++++++
 zh/option/component/dataset.md | 21 +++++++++++++++++++++
 zh/tutorial/data-transform.md  | 14 ++++++++++++++
 4 files changed, 70 insertions(+)

diff --git a/en/option/component/dataset.md b/en/option/component/dataset.md
index b02e1f2..6729866 100644
--- a/en/option/component/dataset.md
+++ b/en/option/component/dataset.md
@@ -72,3 +72,24 @@ Note: "the first row/column" means that if 
[series.seriesLayoutBy](~series.serie
 {{ import: component-data-transform-filter }}
 {{ import: component-data-transform-sort }}
 {{ import: component-data-transform-external }}
+
+## fromDatasetIndex(number)
+
+Specify the input dataset for [dataset.transform](~dataset.transform).
+If [dataset.transform](~dataset.transform) specified but both 
`fromDatasetIndex` and `fromDatasetId` are not specified, `fromDatasetIndex: 0` 
will be used by default.
+
+{{ use: partial-data-transform-tutorial-ref }}
+
+## fromDatasetId(string)
+
+Specify the input dataset for [dataset.transform](~dataset.transform).
+
+{{ use: partial-data-transform-tutorial-ref }}
+
+## fromTransformResult(number)
+
+If a [dataset.transform](~dataset.transform) produces more than one result, we 
can use `fromTransformResult` to retrieve some certain result.
+
+In most cases, `fromTransformResult` do not need to be specified because most 
transforms only produce one result. If `fromTransformResult` is not specified, 
we use `fromTransformResult: 0` by default.
+
+{{ use: partial-data-transform-tutorial-ref }}
diff --git a/en/tutorial/data-transform.md b/en/tutorial/data-transform.md
index 9141544..b325345 100644
--- a/en/tutorial/data-transform.md
+++ b/en/tutorial/data-transform.md
@@ -148,6 +148,7 @@ In most cases, transform functions only need to produce one 
data. But there is i
 
 For example, in the built-in boxplot transform, besides boxplot data produced, 
the outlier data are also produced, which can be used in a scatter series. See 
the [example](${galleryEditorPath}boxplot-light-velocity&edit=1&reset=1).
 
+We use prop 
[dataset.fromTransformResult](option.html#dataset.fromTransformResult) to 
satisfy this requirement. For example:
 
 ```js
 option = {
@@ -191,6 +192,19 @@ option = {
 };
 ```
 
+What more, 
[dataset.fromTransformResult](option.html#dataset.fromTransformResult) and 
[dataset.transform](option.html#dataset.transform) can both appear in one 
dataset, which means that the input of the transform is from retrieved from the 
upstream result specified by `fromTransformResult`. For example:
+
+```js
+{
+    fromDatasetIndex: 1,
+    fromTransformResult: 1,
+    transform: {
+        type: 'sort',
+        config: { dimension: 2, order: 'desc' }
+    }
+}
+```
+
 
 ### Debug in develop environment
 
diff --git a/zh/option/component/dataset.md b/zh/option/component/dataset.md
index 2e22d77..5ad3cc4 100644
--- a/zh/option/component/dataset.md
+++ b/zh/option/component/dataset.md
@@ -74,3 +74,24 @@ ECharts 4 开始支持了 `数据集`(`dataset`)组件用于单独的数据
 {{ import: component-data-transform-sort }}
 {{ import: component-data-transform-external }}
 
+
+## fromDatasetIndex(number)
+
+指定 [dataset.transform](~dataset.transform) 以哪个 dataset 作为输入。如果 
[dataset.transform](~dataset.transform) 被指定了,但是 `fromDatasetIndex` 和 
`fromDatasetId` 都没有被指定,那么默认会使用 `fromDatasetIndex: 0`.
+
+{{ use: partial-data-transform-tutorial-ref }}
+
+## fromDatasetId(string)
+
+指定 [dataset.transform](~dataset.transform) 以哪个 dataset 作为输入。
+
+{{ use: partial-data-transform-tutorial-ref }}
+
+## fromTransformResult(number)
+
+如果一个 [dataset.transform](~dataset.transform) 会产出多个结果 data ,我们可以使用 
`fromTransformResult` 获得特定的结果。
+
+大多数场景下,transform 只会产出一个结果,所以大多数情况下 `fromTransformResult` 并不需要指定。当不指定 
`fromTransformResult` 时,默认使用 `fromTransformResult: 0`。
+
+{{ use: partial-data-transform-tutorial-ref }}
+
diff --git a/zh/tutorial/data-transform.md b/zh/tutorial/data-transform.md
index 2e8d29d..0d40d39 100644
--- a/zh/tutorial/data-transform.md
+++ b/zh/tutorial/data-transform.md
@@ -139,6 +139,7 @@ option: {
 
 例如,在内置的 "boxplot" transform 中,除了 boxplot 系列所需要的 data 外,离群点( outlier 
)也会被生成,并且可以用例如散点图系列显示出来。例如,[example](${galleryEditorPath}boxplot-light-velocity&edit=1&reset=1)。
 
+我们提供配置 [dataset.fromTransformResult](option.html#dataset.fromTransformResult) 
来满足这种情况,例如:
 
 ```js
 option = {
@@ -184,6 +185,19 @@ option = {
 };
 ```
 
+另外,[dataset.fromTransformResult](option.html#dataset.fromTransformResult) 和 
[dataset.transform](option.html#dataset.transform) 能同时出现在一个 dataset 中,这表示,这个 
transform 的输入,是上游的结果中以 `fromTransformResult` 获取的结果。例如:
+
+```js
+{
+    fromDatasetIndex: 1,
+    fromTransformResult: 1,
+    transform: {
+        type: 'sort',
+        config: { dimension: 2, order: 'desc' }
+    }
+}
+```
+
 
 ### 在开发环境中 debug
 


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

Reply via email to