Data Visualization
Generate customizable pie charts from data with various styling options
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/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}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/pie-chart-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| chartData | textarea | Oui | Data for the chart. Can be JSON array or simple label:value pairs |
| chartTitle | text | Non | Title that will be displayed above the chart |
| colorScheme | select | Non | — |
| backgroundColor | color | Non | Background color for the chart container |
| chartSize | number | Non | Size of the chart in pixels (width and height) |
| innerRadius | number | Non | Inner radius for donut chart (0 for pie chart) |
| startAngle | number | Non | Starting angle in degrees (0-360) |
| showPercentage | checkbox | Non | Display percentage values on pie slices |
| showLabels | checkbox | Non | Display labels on pie slices |
| showLegend | checkbox | Non | Display a legend with all items |
Résultat HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client 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"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"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
}
}
}Des questions ou un problème ? Contactez [email protected]