Data Visualization
生成平行坐标图,用于多维数据可视化,支持自定义归一化方法
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/parallel-coordinates-chart' \
-H 'Content-Type: application/json' \
-d '{"chartData":"JSON array format:\n[{"name": "Product A", "price": 100, "quality": 8.5, "sales": 250, "rating": 4.2},\n {"name": "Product B", "price": 150, "quality": 9.2, "sales": 180, "rating": 4.8},\n {"name": "Product C", "price": 80, "quality": 7.8, "sales": 320, "rating": 3.9}]\n\nEach object represents a data item with multiple numeric dimensions","chartTitle":"输入图表标题...","axisCount":"10","normalizationMethod":"minmax","colorScheme":"default","backgroundColor":"#ffffff","gridColor":"#e0e0e0","lineWidth":"1.5","lineOpacity":"0.7","chartWidth":"1200","chartHeight":"600","fontSize":"12","marginSize":"80","showGrid":true,"showLabels":true,"showLegend":true,"showStats":true}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/parallel-coordinates-chart| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| chartData | textarea | 是 | 图表数据。必须是包含数值维度的对象JSON数组 |
| chartTitle | text | 否 | 显示在图表上方的标题 |
| axisCount | number | 否 | 显示的最大维度/轴数量 |
| normalizationMethod | select | 否 | — |
| colorScheme | select | 否 | — |
| backgroundColor | color | 否 | 图表容器的背景颜色 |
| gridColor | color | 否 | 网格线的颜色 |
| lineWidth | number | 否 | 数据线的宽度 |
| lineOpacity | number | 否 | 数据线的透明度(0-1,支持小数) |
| chartWidth | number | 否 | 图表的像素宽度 |
| chartHeight | number | 否 | 图表的像素高度 |
| fontSize | number | 否 | 轴标签的字体大小 |
| marginSize | number | 否 | 图表周围的边距 |
| showGrid | checkbox | 否 | 显示网格线以便更好阅读 |
| showLabels | checkbox | 否 | 为每个轴显示标签 |
| showLegend | checkbox | 否 | 显示包含线条颜色的图例 |
| showStats | 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-parallel-coordinates-chart": {
"name": "parallel-coordinates-chart",
"description": "生成平行坐标图,用于多维数据可视化,支持自定义归一化方法",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=parallel-coordinates-chart",
"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": "parallel-coordinates-chart",
"arguments": {
"chartData": "JSON array format:\n[{"name": "Product A", "price": 100, "quality": 8.5, "sales": 250, "rating": 4.2},\n {"name": "Product B", "price": 150, "quality": 9.2, "sales": 180, "rating": 4.8},\n {"name": "Product C", "price": 80, "quality": 7.8, "sales": 320, "rating": 3.9}]\n\nEach object represents a data item with multiple numeric dimensions",
"chartTitle": "输入图表标题...",
"axisCount": "10",
"normalizationMethod": "minmax",
"colorScheme": "default",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"lineWidth": "1.5",
"lineOpacity": "0.7",
"chartWidth": "1200",
"chartHeight": "600",
"fontSize": "12",
"marginSize": "80",
"showGrid": true,
"showLabels": true,
"showLegend": true,
"showStats": true
}
}
}有问题或反馈?请联系 [email protected]