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

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

commit f02aa3fa0d5c2bc4d96e21473436b8facc44147c
Author: 100pah <sushuang0...@gmail.com>
AuthorDate: Tue Nov 17 20:55:39 2020 +0800

    fix: (1) complement guide in README. (2) Add reference of 
`exampleEditorPath`
---
 README.md                       | 30 ++++++++++++++++++++++++++++++
 configs/config.asf.js           |  3 ++-
 configs/config.dev.js           |  1 +
 contents/en/concepts/dataset.md | 12 ++++++------
 contents/zh/concepts/dataset.md | 12 ++++++------
 5 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 1d364fa..0b06ab8 100644
--- a/README.md
+++ b/README.md
@@ -28,4 +28,34 @@ npm run generate
 
 ## Writing
 
+### Create a new article
+
 Add `.md` files under `contents/zh/` or `contents/en/`, and fill in the info 
in `contents/zh/posts.js` and `contents/en/posts.js`.
+
+
+### Reference to Apache ECharts Doc
+
+Do it like this:
+```md
+xxxx [series.encode](${optionPath}#series.encode) xxxx
+```
+
+Note: if you want it to work in development environment, you may need to edit 
the config file `configs/config.dev.js`: make the value of `optionPath` point 
to a running environment of `incubator-echarts-doc`.
+
+
+### Reference to an example
+
+Suppose `area-basic` is one of the example names in 
`incubator-echarts-examples`.
+
+Just add a link of the example:
+```md
+[this case](${exampleEditorPath}area-basic&edit=1&reset=1)
+```
+
+Embed the live example into the page:
+```md
+<iframe width="600" height="300" 
src="${exampleViewPath}area-basic&edit=1&reset=1"></iframe>
+```
+
+Note: if you want it to work in development environment, you may need to edit 
the config file `configs/config.dev.js`: make the value of `exampleViewPath` 
and `exampleEditorPath` point to a running environment of 
`incubator-echarts-examples`.
+
diff --git a/configs/config.asf.js b/configs/config.asf.js
index 78bbd8a..c54ed6e 100644
--- a/configs/config.asf.js
+++ b/configs/config.asf.js
@@ -1,7 +1,8 @@
 export default {
   base: '',
   rootPath: 'http://127.0.0.1:8080',
-  galleryViewPath: 'https://echarts.apache.org/examples/zh/view.html?c=',
+  exampleViewPath: 'https://echarts.apache.org/examples/zh/view.html?c=',
+  exampleEditorPath: 'https://echarts.apache.org/examples/zh/editor.html?c=',
   mainSitePath: 'https://echarts.apache.org/',
   optionPath: 'https://echarts.apache.org/option.html#',
   gitRepo: 'apache/incubator-echarts-handbook'
diff --git a/configs/config.dev.js b/configs/config.dev.js
index 746a2ee..cd410ff 100644
--- a/configs/config.dev.js
+++ b/configs/config.dev.js
@@ -2,6 +2,7 @@ export default {
   base: '/echarts-handbook/dist',
   rootPath: 'http://localhost:3000/echarts-handbook/dist',
   exampleViewPath: 
'http://localhost/incubator-echarts-website/examples/zh/view.html?c=',
+  exampleEditorPath: 
'http://localhost/incubator-echarts-website/examples/zh/editor.html?c=',
   mainSitePath: 'http://localhost/incubator-echarts-website/',
   optionPath: 'http://localhost/incubator-echarts-website/option.html#',
   gitRepo: 'apache/incubator-echarts-handbook'
diff --git a/contents/en/concepts/dataset.md b/contents/en/concepts/dataset.md
index 7a34d95..e2d8a9c 100644
--- a/contents/en/concepts/dataset.md
+++ b/contents/en/concepts/dataset.md
@@ -170,7 +170,7 @@ option = {
 }
 ```
 
-The effect of configuration is shown in [this 
case](${exampleViewPath}dataset-series-layout-by&edit=1&reset=1).
+The effect of configuration is shown in [this 
case](${exampleEditorPath}dataset-series-layout-by&edit=1&reset=1).
 
 ## Dimension
 
@@ -258,7 +258,7 @@ var option = {
 };
 ```
 
-[Here](${exampleViewPath}dataset-encode-simple0&edit=1&reset=1) shows the 
effect of this example.
+[Here](${exampleEditorPath}dataset-encode-simple0&edit=1&reset=1) shows the 
effect of this example.
 
 The basic structure of `series.encode` declaration:
 + To the left of the colon: Specific name of axis or label.
@@ -314,7 +314,7 @@ encode: {
 }
 ```
 
-This is a richer [example](${exampleViewPath}dataset-encode1&edit=1&reset=1) 
of `series.encode`.
+This is a richer [example](${exampleEditorPath}dataset-encode1&edit=1&reset=1) 
of `series.encode`.
 
 
 
@@ -327,7 +327,7 @@ It is worth mentioning that ECharts will use some default 
mapping rules for some
 + Without axis (such as Pie Chart):
        + Use the first column(row) as the name, second column(row) as value. 
ECharts will not set the name if there is only one column(row).
 
-While the default rule cannot fulfill the requirements, you can configure 
`encode` by yourself, which is not complicate. Here is an 
[example](${exampleViewPath}dataset-default&edit=1&reset=1).
+While the default rule cannot fulfill the requirements, you can configure 
`encode` by yourself, which is not complicate. Here is an 
[example](${exampleEditorPath}dataset-default&edit=1&reset=1).
 
 
 ## Some Normal Settings of series.encode
@@ -435,7 +435,7 @@ A: Check your spelling, such as misspell the dimension name 
`'Life Expectancy'`
 
 ## Visual Channel Mapping
 
-We can map visual channel by using [visualMap](${optionPath}#visualMap). Check 
details in the [visualMap](${optionPath}#visualMap) document. Here is an 
[example](${exampleViewPath}dataset-encode0&edit=1&reset=1).
+We can map visual channel by using [visualMap](${optionPath}#visualMap). Check 
details in the [visualMap](${optionPath}#visualMap) document. Here is an 
[example](${exampleEditorPath}dataset-encode0&edit=1&reset=1).
 
 
 ## Formats of Charts
@@ -533,4 +533,4 @@ The following charts now support dataset:
 `line`, `bar`, `pie`, `scatter`, `effectScatter`, `parallel`, `candlestick`, 
`map`, `funnel`, `custom`.
 ECharts will support more charts in the future.
 
-In the end, here is an 
[example](${exampleViewPath}dataset-link&edit=1&reset=1) of several charts 
shared one `dataset` with linkage interaction.
\ No newline at end of file
+In the end, here is an 
[example](${exampleEditorPath}dataset-link&edit=1&reset=1) of several charts 
shared one `dataset` with linkage interaction.
\ No newline at end of file
diff --git a/contents/zh/concepts/dataset.md b/contents/zh/concepts/dataset.md
index fa5c85c..383b5fb 100644
--- a/contents/zh/concepts/dataset.md
+++ b/contents/zh/concepts/dataset.md
@@ -168,7 +168,7 @@ option = {
 }
 ```
 
-[这个例子](${exampleViewPath}dataset-series-layout-by&edit=1&reset=1) 里给出了设置的效果。
+[这个例子](${exampleEditorPath}dataset-series-layout-by&edit=1&reset=1) 里给出了设置的效果。
 
 
 ## 维度( dimension )
@@ -257,7 +257,7 @@ var option = {
 };
 ```
 
-[这个例子](${exampleViewPath}dataset-encode-simple0&edit=1&reset=1) 里是上面设置的效果。
+[这个例子](${exampleEditorPath}dataset-encode-simple0&edit=1&reset=1) 里是上面设置的效果。
 
 
 `series.encode` 声明的基本结构如下。其中冒号左边是坐标系、标签等特定名称,如 `'x'`, `'y'`, `'tooltip'` 
等,冒号右边是数据中的维度名(string 格式)或者维度的序号(number 格式,从 0 
开始计数),可以指定一个或多个维度(使用数组)。通常情况下,下面各种信息不需要所有的都写,按需写即可。
@@ -308,7 +308,7 @@ encode: {
 }
 ```
 
-这是个更丰富的 `series.encode` 的 
[示例](${exampleViewPath}dataset-encode1&edit=1&reset=1) 。
+这是个更丰富的 `series.encode` 的 
[示例](${exampleEditorPath}dataset-encode1&edit=1&reset=1) 。
 
 
 
@@ -321,7 +321,7 @@ encode: {
 + 如果没有坐标系(如饼图)
     + 取第一列(行)为名字,第二列(行)为数值(如果只有一列,则取第一列为数值)。
 
-默认的规则不能满足要求时,就可以自己来配置 `encode`,也并不复杂。这是一个 
[例子](${exampleViewPath}dataset-default&edit=1&reset=1)。
+默认的规则不能满足要求时,就可以自己来配置 `encode`,也并不复杂。这是一个 
[例子](${exampleEditorPath}dataset-default&edit=1&reset=1)。
 
 
 
@@ -431,7 +431,7 @@ var option = {
 
 ## 视觉通道(颜色、尺寸等)的映射
 
-我们可以使用 [visualMap](${optionPath}#visualMap) 组件进行视觉通道的映射。详见 
[visualMap](${optionPath}#visualMap) 文档的介绍。这是一个 
[示例](${exampleViewPath}dataset-encode0&edit=1&reset=1)。
+我们可以使用 [visualMap](${optionPath}#visualMap) 组件进行视觉通道的映射。详见 
[visualMap](${optionPath}#visualMap) 文档的介绍。这是一个 
[示例](${exampleEditorPath}dataset-encode0&edit=1&reset=1)。
 
 
 
@@ -531,5 +531,5 @@ ECharts 4 之前一直以来的数据声明方式仍然被正常支持,如果
 后续会有更多的图表进行支持。
 
 
-最后,给出这个 [示例](${exampleViewPath}dataset-link&edit=1&reset=1),多个图表共享一个 
`dataset`,并带有联动交互。
+最后,给出这个 [示例](${exampleEditorPath}dataset-link&edit=1&reset=1),多个图表共享一个 
`dataset`,并带有联动交互。
 


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

Reply via email to