树状图生成器
从层级数据生成交互式树状图,支持自定义样式
API 文档
请求端点
POST /zh/api/tools/tree-diagram-generator
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| treeData | textarea | 是 | 树的层级数据。支持JSON对象或父子关系文本格式 |
| chartTitle | text | 否 | 显示在图表上方的标题 |
| nodeShape | select | 否 | - |
| nodeColor | color | 否 | 树节点的颜色 |
| nodeTextColor | color | 否 | 节点文字的颜色 |
| lineColor | color | 否 | 连接线的颜色 |
| backgroundColor | color | 否 | 图表容器的背景颜色 |
| nodeSize | number | 否 | 节点的像素大小 |
| fontSize | number | 否 | 节点文字的字体大小 |
| lineWidth | number | 否 | 连接线的宽度 |
| chartHeight | number | 否 | 图表的像素高度 |
| showLabels | checkbox | 否 | 在节点上显示文字标签 |
| showValues | checkbox | 否 | 在节点上显示数值 |
响应格式
{
"result": "Processed HTML content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
HTML:
HTML
AI MCP 文档
将此工具添加到您的 MCP 服务器配置中:
{
"mcpServers": {
"elysiatools-tree-diagram-generator": {
"name": "tree-diagram-generator",
"description": "从层级数据生成交互式树状图,支持自定义样式",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=tree-diagram-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。
如果遇见问题,请联系我们:[email protected]