mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
Merge pull request #3561 from 2betop/doc-chart-radios
doc: 补充 chart-radios 文档
This commit is contained in:
commit
9b99114538
57
docs/zh-CN/components/form/chart-radios.md
Normal file
57
docs/zh-CN/components/form/chart-radios.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Chart 单选框
|
||||
description:
|
||||
type: 0
|
||||
group: ⚙ 组件
|
||||
menuName: Chart 单选框
|
||||
icon:
|
||||
order: 34
|
||||
---
|
||||
|
||||
图表点选功能,用来做多个图表联动。
|
||||
|
||||
```schema: scope="body"
|
||||
{
|
||||
"type": "form",
|
||||
"debug": true,
|
||||
"body": [
|
||||
{
|
||||
"type": "chart-radios",
|
||||
name: 'main',
|
||||
chartValueField: 'num',
|
||||
"options": [
|
||||
{
|
||||
"label": "A",
|
||||
"num": 100,
|
||||
value: 'a'
|
||||
},
|
||||
{
|
||||
"label": "B",
|
||||
"num": 120,
|
||||
value: 'b'
|
||||
},
|
||||
{
|
||||
"label": "C",
|
||||
"num": 30,
|
||||
value: 'c'
|
||||
},
|
||||
{
|
||||
"label": "D",
|
||||
"num": 40,
|
||||
value: 'd'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 属性表
|
||||
|
||||
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
|
||||
|
||||
| 属性名 | 类型 | 默认值 | 说明 ## 二级标题 |
|
||||
| ---------------------- | --------- | --------- | -------------------------- |
|
||||
| config | `object` | | echart 图表配置 |
|
||||
| showTooltipOnHighlight | `boolean` | `false` | 高亮的时候是否显示 tooltip |
|
||||
| chartValueField | `string` | `"value"` | 图表数值字段名 |
|
@ -537,6 +537,16 @@ export const components = [
|
||||
import('../../docs/zh-CN/components/form/radios.md').then(wrapDoc)
|
||||
)
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Chart 单选框',
|
||||
path: '/zh-CN/components/form/chart-radios',
|
||||
component: React.lazy(() =>
|
||||
import('../../docs/zh-CN/components/form/chart-radios.md').then(
|
||||
wrapDoc
|
||||
)
|
||||
)
|
||||
},
|
||||
{
|
||||
label: 'InputRating 评分',
|
||||
path: '/zh-CN/components/form/input-rating',
|
||||
|
@ -35,7 +35,7 @@ const scopes = {
|
||||
"autoFocus": false,
|
||||
"api": "/api/mock/saveForm?waitSeconds=1",
|
||||
"mode": "horizontal",
|
||||
"controls": SCHEMA_PLACEHOLDER,
|
||||
"body": SCHEMA_PLACEHOLDER,
|
||||
"submitText": null,
|
||||
"actions": []
|
||||
}
|
||||
@ -62,7 +62,7 @@ const scopes = {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"autoFocus": false,
|
||||
"controls": [
|
||||
"body": [
|
||||
SCHEMA_PLACEHOLDER
|
||||
],
|
||||
"submitText": null,
|
||||
|
Loading…
Reference in New Issue
Block a user