Skip to content

Commit

Permalink
feat(doc): add doc for apache/echarts#16904
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Jun 13, 2022
1 parent bee3b50 commit 94e98e0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
7 changes: 3 additions & 4 deletions en/option/series/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%']

This comment has been minimized.

Copy link
@plainheart

plainheart Jun 13, 2022

Member

It may be needed to indicate the percentage value is supported since v5.3.3.

```

## zoom(number) = 1
Expand Down Expand Up @@ -698,4 +698,3 @@ Label position, options:
prefix = "####",
defaultShow = true
) }}

10 changes: 9 additions & 1 deletion en/option/series/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down Expand Up @@ -211,4 +220,3 @@ The color of the map area.
{{ use: partial-label-line(
prefix = '####'
) }}

7 changes: 3 additions & 4 deletions en/option/series/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -471,4 +471,3 @@ Defines the style of the tree edge.
prefix = ${prefix},
state = ${state}
) }}

7 changes: 3 additions & 4 deletions zh/option/series/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -706,4 +706,3 @@ links: [{
prefix = "####",
defaultShow = true
) }}

10 changes: 9 additions & 1 deletion zh/option/series/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) 来更改。
Expand Down Expand Up @@ -208,4 +217,3 @@
{{ use: partial-label-line(
prefix = '####'
) }}

7 changes: 3 additions & 4 deletions zh/option/series/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -514,4 +514,3 @@ center: [115.97, 29.71]
prefix = ${prefix},
state = ${state}
) }}

0 comments on commit 94e98e0

Please sign in to comment.