create_chart
Generates ready-to-use AMIS chart schemas for pie, bar, line, and funnel charts from a data API, with optional title, height, and drill-down settings.
Instructions
快速创建图表组件。返回可直接使用的 AMIS 图表 schema。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chart_type": "<chart_type>",
"api": "<api>"
},
"name": "create_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | Yes | 数据接口地址,如 /api/stats | |
| title | No | 图表标题(可选) | |
| height | No | 图表高度,默认 400(可选) | |
| chart_type | Yes | 图表类型: pie(饼图), bar(柱状图), line(折线图), funnel(漏斗图) | |
| drilldown_api | No | 钻取详情接口地址(可选) |