From 33dfa3b11713d1367c226b8a4446144028f1bf9b Mon Sep 17 00:00:00 2001 From: Visiky <736929286@qq.com> Date: Mon, 22 Mar 2021 16:17:55 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20label-line=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=A1=A5=E5=85=A8=20(#2443)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/common/label.en.md | 12 ++++++++++-- docs/common/label.zh.md | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/common/label.en.md b/docs/common/label.en.md index 44d12bc411..55618b6b84 100644 --- a/docs/common/label.en.md +++ b/docs/common/label.en.md @@ -7,10 +7,10 @@ | 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 | @@ -18,6 +18,14 @@ | 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 diff --git a/docs/common/label.zh.md b/docs/common/label.zh.md index a87ce91520..16cd4d317e 100644 --- a/docs/common/label.zh.md +++ b/docs/common/label.zh.md @@ -7,10 +7,10 @@ | 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 与当前图形的相对位置 | @@ -18,6 +18,14 @@ | formatter | _Function_ | 格式化函数 | | autoHide | _boolean_ | 是否自动隐藏,默认 false | +__*LabelLineCfg*__ 类型定义如下:(关于 _ShapeAttrs_ 详细查看 [ShapeAttrs](/zh/docs/api/shape/shape-attrs) 文档) + +```plain +type LabelLineCfg = { + style?: ShapeAttrs; +} +``` + 示例代码: ```ts