Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: label-line 类型定义补全 #2443

Merged
merged 1 commit into from Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/components/tooltip.en.md
Expand Up @@ -11,7 +11,7 @@ order: 3

#### Tooltip

<img src="https://gw.alipayobjects.com/zos/antfincdn/HjTKrPN%24j6/tooltip-intro.png" class="component-img" alt="tooltip" />
<img src="https://gw.alipayobjects.com/zos/antfincdn/qAwyqRLJXT/Tooltip%252520jieshao.png" class="component-img" alt="tooltip" />

#### Configurations (_TooltipCfg_)

Expand Down
2 changes: 1 addition & 1 deletion docs/api/components/tooltip.zh.md
Expand Up @@ -13,7 +13,7 @@ order: 3

#### Tooltip 组成

<img src="https://gw.alipayobjects.com/zos/antfincdn/HjTKrPN%24j6/tooltip-intro.png" class="component-img" alt="tooltip" />
<img src="https://gw.alipayobjects.com/zos/antfincdn/qAwyqRLJXT/Tooltip%252520jieshao.png" class="component-img" alt="tooltip" />

#### 配置项 (_TooltipCfg_)

Expand Down
12 changes: 10 additions & 2 deletions docs/common/label.en.md
Expand Up @@ -7,17 +7,25 @@
| offsetX | _number_ | The offset distance of the label from the data point in the X direction |
| offsetY | _number_ | The offset distance of the label from the data point in the Y direction |
| content | _string \| IGroup \| IShape \| GeometryLabelContentCallback_ | Text content that is displayed, if not declared, is displayed according to the value of the first field participating in the mapping |
| style | object | Label text graphic property style |
| style | _ShapeAttrs_ | Label text graphic property style |
| autoRotate | _string_ | Whether to rotate automatically, default true |
| rotate | _number_ | Text rotation Angle |
| labelLine | _null \| \_boolean_ \|object\_ | Used to set the style property of the text connector. NULL indicates that it is not displayed. |
| labelLine | _null_ \| _boolean_ \| _LabelLineCfg_ | Used to set the style property of the text connector. NULL indicates that it is not displayed. |
| labelEmit | _boolean_ | Only applies to text in polar coordinates, indicating whether the text is radially displayed according to the Angle. True means on and false means off |
| layout | _'overlap' \| 'fixedOverlap' \| 'limitInShape'_ | Text layout type, support a variety of layout function combination. |
| position | _'top' \| 'bottom' \| 'middle' \| 'left' \| 'right'_ | Specifies the position of the current Label relative to the current graphic |
| animate | _boolean \| AnimateOption_ | Animation configuration. |
| formatter | _Function_ | Format function |
| autoHide | _boolean_ | Whether to hide it automatically, default to false |

Types of __*LabelLineCfg*__ are as follow: (Go [ShapeAttrs](/zh/docs/api/shape/shape-attrs) see more details about _ShapeAttrs_)

```plain
type LabelLineCfg = {
style?: ShapeAttrs;
}
```

Example code:

```ts
Expand Down
12 changes: 10 additions & 2 deletions docs/common/label.zh.md
Expand Up @@ -7,17 +7,25 @@
| offsetX | _number_ | label 相对于数据点在 X 方向的偏移距离 |
| offsetY | _number_ | label 相对于数据点在 Y 方向的偏移距离 |
| content | _string \| IGroup \| IShape \| GeometryLabelContentCallback_ | 展示的文本内容,如果不声明则按照参与映射的第一字段的值进行显示 |
| style | object | label 文本图形属性样式 |
| style | _ShapeAttrs_ | label 文本图形属性样式 |
| autoRotate | _string_ | 是否自动旋转,默认 true |
| rotate | _number_ | 文本旋转角度 |
| labelLine | _null \| _boolean_ \|object_ | 用于设置文本连接线的样式属性,null 表示不展示。 |
| labelLine | _null_ \| _boolean_ \| _LabelLineCfg_ | 用于设置文本连接线的样式属性,null 表示不展示。 |
| labelEmit | _boolean_ | 只对极坐标下的文本生效,表示文本是否按照角度进行放射状显示,true 表示开启,false 表示关闭 |
| layout | _'overlap' \| 'fixedOverlap' \| 'limitInShape'_ | 文本布局类型,支持多种布局函数组合使用。 |
| position | _'top' \| 'bottom' \| 'middle' \| 'left' \| 'right'_ | 指定当前 label 与当前图形的相对位置 |
| animate | _boolean \| AnimateOption_ | 动画配置。 |
| formatter | _Function_ | 格式化函数 |
| autoHide | _boolean_ | 是否自动隐藏,默认 false |

__*LabelLineCfg*__ 类型定义如下:(关于 _ShapeAttrs_ 详细查看 [ShapeAttrs](/zh/docs/api/shape/shape-attrs) 文档)

```plain
type LabelLineCfg = {
style?: ShapeAttrs;
}
```

示例代码:

```ts
Expand Down
4 changes: 2 additions & 2 deletions docs/common/marker.zh.md
@@ -1,8 +1,8 @@
| 参数名 | 类型 | 默认值 | 描述 |
| ------- | ---------------------------- | ------ | -------------------------------- |
| symbol | _Marker_ \| _MarkerCallback_ | - | 配置图例 marker 的 symbol 形状 |
| style | ShapeAttrs | - | 图例项 marker 的配置项 |
| spacing | number | - | 图例项 marker 同后面 name 的间距 |
| style | _ShapeAttrs_ | - | 图例项 marker 的配置项 |
| spacing | _number_ | - | 图例项 marker 同后面 name 的间距 |

_Marker_ 为支持的标记类型有: _circle | square | line | diamond | triangle | triangle-down | hexagon | bowtie | cross | tick | plus | hyphen_;
_MarkerCallback_ 为 `(x: number, y: number, r: number) => PathCommand`;
4 changes: 2 additions & 2 deletions docs/common/tooltip.en.md
Expand Up @@ -99,11 +99,11 @@ Whether to render TooltipMarkers.

##### marker

<description>**optional** _object_</description>
<description>**optional** _ShapeAttrs_</description>

TooltipMarker style configuration.

`markdown:docs/common/marker.en.md`
Please refer to the style configuration [ShapeAttrs](/en/docs/api/graphic-style)

##### showContent

Expand Down
4 changes: 2 additions & 2 deletions docs/common/tooltip.zh.md
Expand Up @@ -99,11 +99,11 @@ true 表示合并当前点对应的所有数据并展示,false 表示只展示

##### marker

<description>**可选** _object_</description>
<description>**可选** _ShapeAttrs_</description>

tooltipMarker 的样式配置。

`markdown:docs/common/marker.zh.md`
样式配置类型,详细可见: [ShapeAttrs](/zh/docs/api/graphic-style)

##### showContent

Expand Down