Skip to content

Commit 94e98e0

Browse files
committed
feat(doc): add doc for apache/echarts#16904
1 parent bee3b50 commit 94e98e0

File tree

6 files changed

+30
-18
lines changed

6 files changed

+30
-18
lines changed

en/option/series/graph.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Graph is a diagram to represent [nodes](~series-graph.nodes) and the [links](~se
3131
calendar = true
3232
) }}
3333

34-
## center(Array)
34+
## center(Array.<number|string>)
3535

3636
<ExampleUIControlVector default="0,0" dims="x,y" />
3737

38-
Center of current view-port.
38+
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.
3939

4040
Example:
4141
```ts
42-
center: [115.97, 29.71]
42+
center: [115.97, '30%']
4343
```
4444

4545
## zoom(number) = 1
@@ -698,4 +698,3 @@ Label position, options:
698698
prefix = "####",
699699
defaultShow = true
700700
) }}
701-

en/option/series/map.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ Series of same [map type](~series-map.map) will show in one map. At this point,
2424
inMap = true
2525
) }}
2626

27+
## center(Array.<number|string>)
28+
29+
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.
30+
31+
Example:
32+
```ts
33+
center: [115.97, '30%']
34+
```
35+
2736
## geoIndex(number) = null
2837

2938
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.
211220
{{ use: partial-label-line(
212221
prefix = '####'
213222
) }}
214-

en/option/series/tree.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ The tree diagram is mainly used to visualize the tree data structure, which is a
3535
defaultHeight = 'null'
3636
) }}
3737

38-
## center(Array)
38+
## center(Array.<number|string>)
3939

40-
Center of current view-port.
40+
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.
4141

4242
Example:
4343
```ts
44-
center: [115.97, 29.71]
44+
center: [115.97, '30%']
4545
```
4646

4747
## zoom(number) = 1
@@ -471,4 +471,3 @@ Defines the style of the tree edge.
471471
prefix = ${prefix},
472472
state = ${state}
473473
) }}
474-

zh/option/series/graph.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ option.series[0].data.forEach(function (item) {
4040
calendar = true
4141
) }}
4242

43-
## center(Array)
43+
## center(Array.<number|string>)
4444

4545
<ExampleUIControlVector default="0,0" dims="x,y" />
4646

47-
当前视角的中心点
47+
当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
4848

4949
例如:
5050
```ts
51-
center: [115.97, 29.71]
51+
center: [115.97, '30%']
5252
```
5353

5454
## zoom(number) = 1
@@ -706,4 +706,3 @@ links: [{
706706
prefix = "####",
707707
defaultShow = true
708708
) }}
709-

zh/option/series/map.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
inMap = true
2727
) }}
2828

29+
## center(Array.<number|string>)
30+
31+
当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
32+
33+
例如:
34+
```ts
35+
center: [115.97, '30%']
36+
```
37+
2938
## geoIndex(number) = null
3039

3140
默认情况下,map series 会自己生成内部专用的 `geo` 组件。但是也可以用这个 `geoIndex` 指定一个 [geo](~geo) 组件。这样的话,map 和 其他 series(例如散点图)就可以共享一个 [geo](~geo) 组件了。并且,[geo](~geo) 组件的颜色也可以被这个 map series 控制,从而用 [visualMap](~visualMap) 来更改。
@@ -208,4 +217,3 @@
208217
{{ use: partial-label-line(
209218
prefix = '####'
210219
) }}
211-

zh/option/series/tree.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ const option = {
7878
defaultHeight = 'null'
7979
) }}
8080

81-
## center(Array)
81+
## center(Array.<number|string>)
8282

83-
当前视角的中心点
83+
当前视角的中心点。可以是包含两个 `number` 类型(表示像素值)或 `string` 类型(表示相对容器的百分比)的数组。
8484

8585
例如:
8686
```ts
87-
center: [115.97, 29.71]
87+
center: [115.97, '30%']
8888
```
8989

9090
## zoom(number) = 1
@@ -514,4 +514,3 @@ center: [115.97, 29.71]
514514
prefix = ${prefix},
515515
state = ${state}
516516
) }}
517-

0 commit comments

Comments
 (0)