Data Visualization
Generar diagramas de cuerda interactivos para visualizar flujos bidireccionales y relaciones entre entidades
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/chord-diagram-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"JSON array format:\n[{"source": "北京", "target": "上海", "value": 850},\n {"source": "北京", "target": "广州", "value": 620},\n {"source": "北京", "target": "深圳", "value": 480},\n {"source": "上海", "target": "北京", "value": 780},\n {"source": "上海", "target": "广州", "value": 320},\n {"source": "广州", "target": "深圳", "value": 410},\n {"source": "深圳", "target": "北京", "value": 390}]\n\nEach connection represents a flow or relationship between two nodes. Values indicate connection strength.","chartTitle":"Introducir título del gráfico...","sortOrder":"value-desc","colorScheme":"default","backgroundColor":"#ffffff","radius":"300","innerRadius":"150","chordOpacity":"0.6","padding":"0.02","showLabels":true,"showValues":true,"showLegend":true,"showStats":true,"enableAnimation":true,"animationDuration":"1500"}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/chord-diagram-generator| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| chartData | textarea | Sí | Matriz de conexiones con campos source, target y value |
| chartTitle | text | No | Título mostrado arriba del gráfico |
| sortOrder | select | No | — |
| colorScheme | select | No | — |
| backgroundColor | color | No | Color de fondo del gráfico |
| radius | number | No | Radio del círculo exterior en píxeles |
| innerRadius | number | No | Radio del círculo interior en píxeles |
| chordOpacity | number | No | Transparencia de cuerda (0-1) |
| padding | number | No | Espacio entre arcos (0-0.1) |
| showLabels | checkbox | No | Mostrar nombres de entidades |
| showValues | checkbox | No | Mostrar valores de flujo total |
| showLegend | checkbox | No | Mostrar leyenda de colores |
| showStats | checkbox | No | Mostrar estadísticas de flujo |
| enableAnimation | checkbox | No | Animar al cargar |
| animationDuration | number | No | Tiempo de animación en milisegundos |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-chord-diagram-generator": {
"name": "chord-diagram-generator",
"description": "Generar diagramas de cuerda interactivos para visualizar flujos bidireccionales y relaciones entre entidades",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=chord-diagram-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "chord-diagram-generator",
"arguments": {
"chartData": "JSON array format:\n[{"source": "北京", "target": "上海", "value": 850},\n {"source": "北京", "target": "广州", "value": 620},\n {"source": "北京", "target": "深圳", "value": 480},\n {"source": "上海", "target": "北京", "value": 780},\n {"source": "上海", "target": "广州", "value": 320},\n {"source": "广州", "target": "深圳", "value": 410},\n {"source": "深圳", "target": "北京", "value": 390}]\n\nEach connection represents a flow or relationship between two nodes. Values indicate connection strength.",
"chartTitle": "Introducir título del gráfico...",
"sortOrder": "value-desc",
"colorScheme": "default",
"backgroundColor": "#ffffff",
"radius": "300",
"innerRadius": "150",
"chordOpacity": "0.6",
"padding": "0.02",
"showLabels": true,
"showValues": true,
"showLegend": true,
"showStats": true,
"enableAnimation": true,
"animationDuration": "1500"
}
}
}¿Dudas o problemas? Contacta con [email protected]