-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: 完善 legend marker 配置文档 & 优化 pattern demo
- Loading branch information
Showing
4 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
| 参数名 | 类型 | 默认值 | 描述 | | ||
| ------- | ---------------------------- | ------ | -------------------------------- | | ||
| symbol | _Marker_ \| _MarkerCallback_ | - | 配置图例 marker 的 symbol 形状 | | ||
| 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`; | ||
<!-- #### *MarkerCfg* 配置 --> | ||
|
||
| 参数名 | 类型 | 默认值 | 描述 | | ||
| ------- | --------------------- | ------ | ------------------------------------------------------------------------ | | ||
| symbol | _string \| MarkerSymbolCallback_ | - | 配置图例 marker 的 symbol 形状 | | ||
| style | _ShapeAttrs \| ((style: ShapeAttrs) => ShapeAttrs)_ | - | 图例项 marker 的配置项 | | ||
| spacing | number | - | 图例项 marker 同后面 name 的间距 | | ||
|
||
**_MarkerSymbolCallback_** 类型定义如下: | ||
|
||
除了内置一些 symbol 类型,可以指定具体的标记类型,也可以通过回调的方式返回 symbol 绘制的 path 命令 | ||
|
||
内置支持的标记类型有:`"circle" | "square" | "line" | "diamond" | "triangle" | "triangle-down" | "hexagon" | "bowtie" | "cross" | "tick" | "plus" | "hyphen"` | ||
|
||
回调的方式为:`(x: number, y: number, r: number) => PathCommand`; | ||
|
||
<!--这里可以插入一个代码示例--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters