Data Visualization
生成简化的蜘蛛图(雷达图),用于多维度数据对比和分析
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/spider-chart-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"JSON format:\n[{"dimension": "Performance", "value": 85},\n{"dimension": "Quality", "value": 92},\n{"dimension": "Innovation", "value": 78},\n{"dimension": "Teamwork", "value": 88},\n{"dimension": "Leadership", "value": 75}]\n\nor text format:\nPerformance:85\nQuality:92\nInnovation:78\nTeamwork:88\nLeadership:75","chartTitle":"输入图表标题...","colorScheme":"default","lineColor":"#3b82f6","chartSize":"500","maxValue":0,"minValue":"0","lineWidth":"2","pointSize":"5","animationDuration":"1000","backgroundColor":"#ffffff","gridColor":"#e0e0e0","fillArea":true,"showGrid":true,"showValues":true,"showLegend":true}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/spider-chart-generator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| chartData | textarea | 是 | 蜘蛛图数据。支持JSON数组或简单的维度:值文本格式 |
| chartTitle | text | 否 | 显示在图表上方的标题 |
| colorScheme | select | 否 | — |
| lineColor | color | 否 | 蜘蛛图主要线条颜色(覆盖配色方案) |
| chartSize | number | 否 | 方形图表的像素尺寸 |
| maxValue | number | 否 | 图表缩放的最大值(留空自动) |
| minValue | number | 否 | 图表缩放的最小值 |
| lineWidth | number | 否 | 蜘蛛图线的像素宽度 |
| pointSize | number | 否 | 数据点的像素大小 |
| animationDuration | number | 否 | 图表动画的毫秒时长 |
| backgroundColor | color | 否 | 图表容器的背景颜色 |
| gridColor | color | 否 | 网格线的颜色 |
| fillArea | checkbox | 否 | 填充蜘蛛图内部区域 |
| showGrid | checkbox | 否 | 显示网格线以便更好阅读 |
| showValues | checkbox | 否 | 在数据点上显示数值 |
| showLegend | checkbox | 否 | 在图表下方显示数据表 |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-spider-chart-generator": {
"name": "spider-chart-generator",
"description": "生成简化的蜘蛛图(雷达图),用于多维度数据对比和分析",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=spider-chart-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "spider-chart-generator",
"arguments": {
"chartData": "JSON format:\n[{"dimension": "Performance", "value": 85},\n{"dimension": "Quality", "value": 92},\n{"dimension": "Innovation", "value": 78},\n{"dimension": "Teamwork", "value": 88},\n{"dimension": "Leadership", "value": 75}]\n\nor text format:\nPerformance:85\nQuality:92\nInnovation:78\nTeamwork:88\nLeadership:75",
"chartTitle": "输入图表标题...",
"colorScheme": "default",
"lineColor": "#3b82f6",
"chartSize": "500",
"maxValue": 0,
"minValue": "0",
"lineWidth": "2",
"pointSize": "5",
"animationDuration": "1000",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"fillArea": true,
"showGrid": true,
"showValues": true,
"showLegend": true
}
}
}有问题或反馈?请联系 [email protected]