Data Visualization
Gerar diagramas de acordo interativos para visualizar fluxos bidirecionais e relações entre entidades
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/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":"Digitar título do 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"}'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/chord-diagram-generator| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| chartData | textarea | Sim | Array de conexões com campos source, target e value |
| chartTitle | text | Não | Título exibido acima do gráfico |
| sortOrder | select | Não | — |
| colorScheme | select | Não | — |
| backgroundColor | color | Não | Cor de fundo do gráfico |
| radius | number | Não | Raio do círculo externo em pixels |
| innerRadius | number | Não | Raio do círculo interno em pixels |
| chordOpacity | number | Não | Transparência do acordo (0-1) |
| padding | number | Não | Espaço entre arcos (0-0.1) |
| showLabels | checkbox | Não | Exibir nomes das entidades |
| showValues | checkbox | Não | Exibir valores de fluxo total |
| showLegend | checkbox | Não | Exibir legenda de cores |
| showStats | checkbox | Não | Exibir estatísticas de fluxo |
| enableAnimation | checkbox | Não | Animar ao carregar |
| animationDuration | number | Não | Tempo de animação em milissegundos |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-chord-diagram-generator": {
"name": "chord-diagram-generator",
"description": "Gerar diagramas de acordo interativos para visualizar fluxos bidirecionais e relações entre entidades",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=chord-diagram-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus 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": "Digitar título do 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"
}
}
}Dúvidas ou problemas? Contate [email protected]