Data Visualization
Generate customizable pie charts from data with various styling options
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/pie-chart-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"JSON: [{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nor text:\nJan:100\nFeb:150\nMar:120","chartTitle":"Enter chart title...","colorScheme":"default","backgroundColor":"#ffffff","chartSize":"400","innerRadius":"0","startAngle":"0","showPercentage":true,"showLabels":true,"showLegend":true}'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/pie-chart-generator| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| chartData | textarea | Sim | Data for the chart. Can be JSON array or simple label:value pairs |
| chartTitle | text | Não | Title that will be displayed above the chart |
| colorScheme | select | Não | — |
| backgroundColor | color | Não | Background color for the chart container |
| chartSize | number | Não | Size of the chart in pixels (width and height) |
| innerRadius | number | Não | Inner radius for donut chart (0 for pie chart) |
| startAngle | number | Não | Starting angle in degrees (0-360) |
| showPercentage | checkbox | Não | Display percentage values on pie slices |
| showLabels | checkbox | Não | Display labels on pie slices |
| showLegend | checkbox | Não | Display a legend with all items |
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-pie-chart-generator": {
"name": "pie-chart-generator",
"description": "Generate customizable pie charts from data with various styling options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pie-chart-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": "pie-chart-generator",
"arguments": {
"chartData": "JSON: [{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nor text:\nJan:100\nFeb:150\nMar:120",
"chartTitle": "Enter chart title...",
"colorScheme": "default",
"backgroundColor": "#ffffff",
"chartSize": "400",
"innerRadius": "0",
"startAngle": "0",
"showPercentage": true,
"showLabels": true,
"showLegend": true
}
}
}Dúvidas ou problemas? Contate [email protected]