Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Data Visualization

Comparison Bar Chart Generator

Generate back-to-back bar charts for positive and negative value comparison, perfect for contrasting data sets

html· HTML resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
curl -X POST 'https://api.elysiatools.com/en/api/tools/comparison-bar-chart' \
  -H 'Content-Type: application/json' \
  -d '{"chartData":"JSON format:\n[{"label": "Product A", "leftValue": 65, "rightValue": 85},\n{"label": "Product B", "leftValue": 45, "rightValue": 75},\n{"label": "Product C", "leftValue": 80, "rightValue": 60}]\n\nor text format:\nProduct A|65|85\nProduct B|45|75\nProduct C|80|60","chartTitle":"Enter chart title...","colorScheme":"default","barColor":"#3b82f6","leftLabel":"Left Values","rightLabel":"Right Values","chartHeight":"500","barWidth":"30","maxValue":0,"minValue":"0","animationDuration":"1000","backgroundColor":"#ffffff","gridColor":"#e0e0e0","showGrid":true,"showValues":true,"showLegend":true}'

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools

API reference

Send a POST request with your inputs as JSON. File parameters require a separate upload first.

Endpoint

HTTP
POST https://api.elysiatools.com/en/api/tools/comparison-bar-chart

Parameters

NameTypeRequiredDescription
chartDatatextareaYesData for the comparison chart. Supports JSON array or simple label|leftValue|rightValue text format
chartTitletextNoTitle that will be displayed above the chart
colorSchemeselectNo—
barColorcolorNoColor for the left bars (right bar color comes from color scheme)
leftLabeltextNoLabel for the left side of the chart
rightLabeltextNoLabel for the right side of the chart
chartHeightnumberNoHeight of the chart in pixels
barWidthnumberNoMaximum width of the bars in pixels
maxValuenumberNoMaximum value for the chart scale (leave empty for auto)
minValuenumberNoMinimum value for the chart scale
animationDurationnumberNoDuration of bar animation in milliseconds
backgroundColorcolorNoBackground color for the chart container
gridColorcolorNoColor for the grid lines
showGridcheckboxNoDisplay grid lines for better readability
showValuescheckboxNoDisplay values on the bars
showLegendcheckboxNoDisplay a legend below the chart

Response format

HTML result

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

MCP integration

Add this tool to your Model Context Protocol server so AI agents can list and call it.

Server configuration

Add this block to your MCP client configuration:

mcp.json
{
  "mcpServers": {
    "elysiatools-comparison-bar-chart": {
      "name": "comparison-bar-chart",
      "description": "Generate back-to-back bar charts for positive and negative value comparison, perfect for contrasting data sets",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=comparison-bar-chart",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

List available tools

After connecting to the SSE endpoint, list the exposed tools:

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

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "comparison-bar-chart",
    "arguments": {
  "chartData": "JSON format:\n[{&quot;label&quot;: &quot;Product A&quot;, &quot;leftValue&quot;: 65, &quot;rightValue&quot;: 85},\n{&quot;label&quot;: &quot;Product B&quot;, &quot;leftValue&quot;: 45, &quot;rightValue&quot;: 75},\n{&quot;label&quot;: &quot;Product C&quot;, &quot;leftValue&quot;: 80, &quot;rightValue&quot;: 60}]\n\nor text format:\nProduct A|65|85\nProduct B|45|75\nProduct C|80|60",
  "chartTitle": "Enter chart title...",
  "colorScheme": "default",
  "barColor": "#3b82f6",
  "leftLabel": "Left Values",
  "rightLabel": "Right Values",
  "chartHeight": "500",
  "barWidth": "30",
  "maxValue": 0,
  "minValue": "0",
  "animationDuration": "1000",
  "backgroundColor": "#ffffff",
  "gridColor": "#e0e0e0",
  "showGrid": true,
  "showValues": true,
  "showLegend": true
}
  }
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).

Questions or issues? Contact [email protected]

Browse tools
Open tool