amis/schemas/chart.json

111 lines
3.3 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
2020-09-03 11:45:31 +08:00
"$id": "/schemas/chart.json#",
2020-08-21 15:28:22 +08:00
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/chart.json#/definitions/common"
2020-08-21 15:28:22 +08:00
},
{
"additionalProperties": false,
"dependencies": {},
"patternProperties": {
"^(\\$ref|name|className|api|initFetch|initFetchOn|fetchOn|interval|style|config|width|height|messages)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"type": {
"const": "chart",
"description": "指定为 chart 类型",
"type": "string"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
},
"required": ["type"],
"type": "object"
}
],
"definitions": {
"common": {
"description": "amis Chart 渲染器采用echarts渲染格式说明。https://baidu.github.io/amis/docs/renderers#chart",
"properties": {
"$ref": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/$ref",
2020-08-21 15:28:22 +08:00
"description": "引用页面中的定义"
},
"api": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/api",
2020-08-21 15:28:22 +08:00
"description": "页面初始化的时候,可以设置一个 API 让其取拉取配置"
},
"className": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/className",
2020-08-21 15:28:22 +08:00
"description": "配置容器 className"
},
"config": {
"description": "配置echart的config",
"type": "object"
},
"fetchOn": {
"default": true,
"description": "是否拉取?通过表达式来决定, 条件满足才会拉取",
"type": "string"
},
"height": {
"description": "宽度设置"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"initFetch": {
"default": true,
"description": "是否默认就拉取?",
"type": "boolean"
},
"initFetchOn": {
"default": true,
"description": "是否默认就拉取?通过表达式来决定",
"type": "string"
},
"interval": {
"default": 0,
"description": "刷新时间",
"type": "number"
},
"messages": {
"additionalProperties": false,
"properties": {
"fetchFailed": {
"description": "用来配置当 api 拉取失败时提示的信息",
"type": "string"
},
"fetchSuccess": {
"description": "用来配置当 api 拉取成功时提示的信息,当然不设置的话就不会提示。",
"type": "string"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
},
"type": "object"
},
"name": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/name",
2020-08-21 15:28:22 +08:00
"description": "给当前组件设定一个名,方便其他组件引用。"
},
"style": {
"description": "style样式",
"type": "object"
},
"width": {
"description": "宽度设置"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
}
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"test": {
"properties": {
"type": {
"const": "chart"
}
}
}
},
"description": "amis Chart 渲染器采用echarts渲染格式说明。https://baidu.github.io/amis/docs/renderers#chart",
"type": "object"
}