You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2022/06/13 07:53:50 UTC

[echarts-doc] branch dev updated: feat(doc): add doc for apache/echarts#16904

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 94e98e02 feat(doc): add doc for apache/echarts#16904
94e98e02 is described below

commit 94e98e02c84da9e8dabb141c50cee399347ae2a6
Author: Ovilia <zw...@gmail.com>
AuthorDate: Mon Jun 13 15:53:40 2022 +0800

    feat(doc): add doc for apache/echarts#16904
---
 en/option/series/graph.md |  7 +++----
 en/option/series/map.md   | 10 +++++++++-
 en/option/series/tree.md  |  7 +++----
 zh/option/series/graph.md |  7 +++----
 zh/option/series/map.md   | 10 +++++++++-
 zh/option/series/tree.md  |  7 +++----
 6 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/en/option/series/graph.md b/en/option/series/graph.md
index cf549274..e6dc7886 100644
--- a/en/option/series/graph.md
+++ b/en/option/series/graph.md
@@ -31,15 +31,15 @@ Graph is a diagram to represent [nodes](~series-graph.nodes) and the [links](~se
     calendar = true
 ) }}
 
-## center(Array)
+## center(Array.<number|string>)
 
 <ExampleUIControlVector default="0,0" dims="x,y" />
 
-Center of current view-port.
+Center of current view-port. It can be an arrary containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
 
 Example:
 ```ts
-center: [115.97, 29.71]
+center: [115.97, '30%']
 ```
 
 ## zoom(number) = 1
@@ -698,4 +698,3 @@ Label position, options:
     prefix = "####",
     defaultShow = true
 ) }}
-
diff --git a/en/option/series/map.md b/en/option/series/map.md
index 82a8c82d..c9e461ec 100644
--- a/en/option/series/map.md
+++ b/en/option/series/map.md
@@ -24,6 +24,15 @@ Series of same [map type](~series-map.map) will show in one map. At this point,
     inMap = true
 ) }}
 
+## center(Array.<number|string>)
+
+Center of current view-port. It can be an arrary containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
+
+Example:
+```ts
+center: [115.97, '30%']
+```
+
 ## geoIndex(number) = null
 
 In default case, map series create exclusive `geo` component for themselves. But `geoIndex` can be used to specify an outer [geo component](~geo), which can be shared with other series like [pie](~series-pie). Moreover, the region color of the outer [geo component](~geo) can be controlled by the map series (via [visualMap](~visualMap)).
@@ -211,4 +220,3 @@ The color of the map area.
 {{ use: partial-label-line(
     prefix = '####'
 ) }}
-
diff --git a/en/option/series/tree.md b/en/option/series/tree.md
index fcfe84bc..5fe654d8 100644
--- a/en/option/series/tree.md
+++ b/en/option/series/tree.md
@@ -35,13 +35,13 @@ The tree diagram is mainly used to visualize the tree data structure, which is a
     defaultHeight = 'null'
 ) }}
 
-## center(Array)
+## center(Array.<number|string>)
 
-Center of current view-port.
+Center of current view-port. It can be an arrary containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
 
 Example:
 ```ts
-center: [115.97, 29.71]
+center: [115.97, '30%']
 ```
 
 ## zoom(number) = 1
@@ -471,4 +471,3 @@ Defines the style of the tree edge.
     prefix = ${prefix},
     state = ${state}
 ) }}
-
diff --git a/zh/option/series/graph.md b/zh/option/series/graph.md
index 59219240..769e9154 100644
--- a/zh/option/series/graph.md
+++ b/zh/option/series/graph.md
@@ -40,15 +40,15 @@ option.series[0].data.forEach(function (item) {
     calendar = true
 ) }}
 
-## center(Array)
+## center(Array.<number|string>)
 
 <ExampleUIControlVector default="0,0" dims="x,y" />
 
-当前视角的中心点
+当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
 
 例如:
 ```ts
-center: [115.97, 29.71]
+center: [115.97, '30%']
 ```
 
 ## zoom(number) = 1
@@ -706,4 +706,3 @@ links: [{
     prefix = "####",
     defaultShow = true
 ) }}
-
diff --git a/zh/option/series/map.md b/zh/option/series/map.md
index e23e1a0a..a57b2b40 100644
--- a/zh/option/series/map.md
+++ b/zh/option/series/map.md
@@ -26,6 +26,15 @@
     inMap = true
 ) }}
 
+## center(Array.<number|string>)
+
+当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
+
+例如:
+```ts
+center: [115.97, '30%']
+```
+
 ## geoIndex(number) = null
 
 默认情况下,map series 会自己生成内部专用的 `geo` 组件。但是也可以用这个 `geoIndex` 指定一个 [geo](~geo) 组件。这样的话,map 和 其他 series(例如散点图)就可以共享一个 [geo](~geo) 组件了。并且,[geo](~geo) 组件的颜色也可以被这个 map series 控制,从而用 [visualMap](~visualMap) 来更改。
@@ -208,4 +217,3 @@
 {{ use: partial-label-line(
     prefix = '####'
 ) }}
-
diff --git a/zh/option/series/tree.md b/zh/option/series/tree.md
index 925f8768..e32129e3 100644
--- a/zh/option/series/tree.md
+++ b/zh/option/series/tree.md
@@ -78,13 +78,13 @@ const option = {
     defaultHeight = 'null'
 ) }}
 
-## center(Array)
+## center(Array.<number|string>)
 
-当前视角的中心点
+当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
 
 例如:
 ```ts
-center: [115.97, 29.71]
+center: [115.97, '30%']
 ```
 
 ## zoom(number) = 1
@@ -514,4 +514,3 @@ center: [115.97, 29.71]
     prefix = ${prefix},
     state = ${state}
 ) }}
-


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