Elysia Tools Docs
FR
Langue
ZHESPTRUFRDEEN
Retour au site
Parcourir les outils

Data Visualization

Bar Chart Generator

Generate customizable bar charts from data with various styling options

html· Résultat HTMLOuvrir l'outil

Démarrage rapide

Appelez cet outil depuis votre code en trois langages.

cURL
curl -X POST 'https://api.elysiatools.com/fr/api/tools/bar-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...","chartType":"vertical","barColor":"#3b82f6","backgroundColor":"#ffffff","gridColor":"#e0e0e0","barWidth":"50","chartHeight":"400","maxValue":0,"minValue":"0","xAxisLabel":"Category","yAxisLabel":"Value","showGrid":true,"showValues":true,"showLegend":true}'

© 2026 Elysia Tools. Documentation développeur.

Retour au siteParcourir les outils

Référence de l'API

Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.

Point d'accès

HTTP
POST https://api.elysiatools.com/fr/api/tools/bar-chart-generator

Paramètres

NomTypeRequisDescription
chartDatatextareaOuiData for the chart. Can be JSON array or simple label:value pairs
chartTitletextNonTitle that will be displayed above the chart
chartTypeselectNon—
barColorcolorNonColor for the bars in the chart
backgroundColorcolorNonBackground color for the chart container
gridColorcolorNonColor for the grid lines
barWidthnumberNonWidth of each bar in pixels (auto-adjusts if too large)
chartHeightnumberNonHeight of the chart in pixels
maxValuenumberNonMaximum value for Y-axis (leave empty for auto-scale)
minValuenumberNonMinimum value for Y-axis
xAxisLabeltextNonLabel for the X-axis
yAxisLabeltextNonLabel for the Y-axis
showGridcheckboxNonDisplay horizontal grid lines for better readability
showValuescheckboxNonDisplay the actual values on top of each bar
showLegendcheckboxNonDisplay a legend below the chart

Format de réponse

Résultat HTML

JSON
{
  "result": "<div>Processed HTML content</div>",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}

Intégration MCP

Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.

Configuration du serveur

Ajoutez ce bloc à la configuration de votre client MCP :

mcp.json
{
  "mcpServers": {
    "elysiatools-bar-chart-generator": {
      "name": "bar-chart-generator",
      "description": "Generate customizable bar charts from data with various styling options",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=bar-chart-generator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

Lister les outils disponibles

Après connexion au point d'accès SSE, listez les outils exposés :

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Appeler cet outil

Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "bar-chart-generator",
    "arguments": {
  "chartData": "JSON: [{&quot;label&quot;: &quot;Jan&quot;, &quot;value&quot;: 100},\n{&quot;label&quot;: &quot;Feb&quot;, &quot;value&quot;: 150},\n{&quot;label&quot;: &quot;Mar&quot;, &quot;value&quot;: 120}]\n\nor text:\nJan:100\nFeb:150\nMar:120",
  "chartTitle": "Enter chart title...",
  "chartType": "vertical",
  "barColor": "#3b82f6",
  "backgroundColor": "#ffffff",
  "gridColor": "#e0e0e0",
  "barWidth": "50",
  "chartHeight": "400",
  "maxValue": 0,
  "minValue": "0",
  "xAxisLabel": "Category",
  "yAxisLabel": "Value",
  "showGrid": true,
  "showValues": true,
  "showLegend": true
}
  }
}
Chaînez plusieurs outils dans une session avec une liste toolId séparée par des virgules, ex. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (20 max).

Des questions ou un problème ? Contactez [email protected]

Parcourir les outils
Ouvrir l'outil