Data Visualization
Generate customizable scatter plots with regression lines and multiple data series
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/scatter-plot-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"Single series JSON:\n[{"x": 1, "y": 2}, {"x": 3, "y": 4}]\n\nMulti-series JSON:\n{\n "series": [\n {"name": "Group A", "data": [{"x": 1, "y": 2}]},\n {"name": "Group B", "data": [{"x": 2, "y": 3}]}\n ]\n}\n\nor text:\n1,2\n3,4\n5,6","chartTitle":"Enter chart title...","pointColors":"#3b82f6,#ef4444,#10b981","backgroundColor":"#ffffff","gridColor":"#e0e0e0","pointSize":"5","opacity":"0.8","chartHeight":"400","xMinValue":0,"xMaxValue":0,"yMinValue":0,"yMaxValue":0,"xAxisLabel":"X Values","yAxisLabel":"Y Values","showGrid":true,"showPoints":true,"showLabels":false,"showRegression":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/scatter-plot-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| chartData | textarea | Oui | Data for the scatter plot. Supports single/multi-series JSON or simple x,y pairs |
| chartTitle | text | Non | Title that will be displayed above the chart |
| pointColors | text | Non | Colors for multiple series (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 |
| pointSize | number | Non | Size of data points in pixels |
| opacity | number | Non | Opacity of data points (0.1 to 1.0) |
| chartHeight | number | Non | Height of the chart in pixels |
| xMinValue | number | Non | Minimum value for X-axis (leave empty for auto-scale) |
| xMaxValue | number | Non | Maximum value for X-axis (leave empty for auto-scale) |
| yMinValue | number | Non | Minimum value for Y-axis (leave empty for auto-scale) |
| yMaxValue | number | Non | Maximum value for Y-axis (leave empty for auto-scale) |
| 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 (disable to show only regression lines) |
| showLabels | checkbox | Non | Display labels on data points |
| showRegression | checkbox | Non | Display linear regression lines for each series |
| showLegend | checkbox | Non | Display a legend with all series |
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-scatter-plot-generator": {
"name": "scatter-plot-generator",
"description": "Generate customizable scatter plots with regression lines and multiple data series",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=scatter-plot-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": "scatter-plot-generator",
"arguments": {
"chartData": "Single series JSON:\n[{"x": 1, "y": 2}, {"x": 3, "y": 4}]\n\nMulti-series JSON:\n{\n "series": [\n {"name": "Group A", "data": [{"x": 1, "y": 2}]},\n {"name": "Group B", "data": [{"x": 2, "y": 3}]}\n ]\n}\n\nor text:\n1,2\n3,4\n5,6",
"chartTitle": "Enter chart title...",
"pointColors": "#3b82f6,#ef4444,#10b981",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"pointSize": "5",
"opacity": "0.8",
"chartHeight": "400",
"xMinValue": 0,
"xMaxValue": 0,
"yMinValue": 0,
"yMaxValue": 0,
"xAxisLabel": "X Values",
"yAxisLabel": "Y Values",
"showGrid": true,
"showPoints": true,
"showLabels": false,
"showRegression": false,
"showLegend": true
}
}
}Des questions ou un problème ? Contactez [email protected]