Data Visualization
Generate customizable multi-line 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/line-chart-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"Single line JSON:\n[{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nMulti-line JSON:\n{\n "labels": ["Jan", "Feb", "Mar"],\n "series": [\n {"name": "Product A", "data": [100, 150, 120]},\n {"name": "Product B", "data": [80, 110, 140]}\n ]\n}\n\nor text (single line):\nJan:100\nFeb:150\nMar:120","chartTitle":"Enter chart title...","curveType":"linear","lineColors":"#3b82f6,#ef4444,#10b981","backgroundColor":"#ffffff","gridColor":"#e0e0e0","lineWidth":"3","chartHeight":"400","maxValue":0,"minValue":0,"xAxisLabel":"Category","yAxisLabel":"Value","showGrid":true,"showPoints":true,"showValues":true,"fillArea":false,"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/line-chart-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| chartData | textarea | Oui | Data for the chart. Supports single line array, multi-line object, or simple text format |
| chartTitle | text | Non | Title that will be displayed above the chart |
| curveType | select | Non | — |
| lineColors | text | Non | Colors for multiple lines (comma-separated hex colors). Leave empty for default colors. |
| backgroundColor | color | Non | Background color for the chart container |
| gridColor | color | Non | Color for the grid lines |
| lineWidth | number | Non | Width of the line in pixels |
| chartHeight | number | Non | Height of the chart in pixels |
| maxValue | number | Non | Maximum value for Y-axis (leave empty for auto-scale) |
| minValue | number | Non | Minimum value for Y-axis |
| xAxisLabel | text | Non | Label for the X-axis |
| yAxisLabel | text | Non | Label for the Y-axis |
| showGrid | checkbox | Non | Display grid lines for better readability |
| showPoints | checkbox | Non | Display data points on the line |
| showValues | checkbox | Non | Display the actual values on data points |
| fillArea | checkbox | Non | Fill the area under the line with color |
| showLegend | checkbox | Non | Display a legend below the chart |
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-line-chart-generator": {
"name": "line-chart-generator",
"description": "Generate customizable multi-line charts from data with various styling options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=line-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": "line-chart-generator",
"arguments": {
"chartData": "Single line JSON:\n[{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nMulti-line JSON:\n{\n "labels": ["Jan", "Feb", "Mar"],\n "series": [\n {"name": "Product A", "data": [100, 150, 120]},\n {"name": "Product B", "data": [80, 110, 140]}\n ]\n}\n\nor text (single line):\nJan:100\nFeb:150\nMar:120",
"chartTitle": "Enter chart title...",
"curveType": "linear",
"lineColors": "#3b82f6,#ef4444,#10b981",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"lineWidth": "3",
"chartHeight": "400",
"maxValue": 0,
"minValue": 0,
"xAxisLabel": "Category",
"yAxisLabel": "Value",
"showGrid": true,
"showPoints": true,
"showValues": true,
"fillArea": false,
"showLegend": true
}
}
}Des questions ou un problème ? Contactez [email protected]