Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Data Visualization

Donut Chart Generator

Generate customizable donut charts (ring charts) from data with various styling options, perfect for showing proportions with a central space

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/donut-chart-generator' \
  -H 'Content-Type: application/json' \
  -d '{"chartData":"JSON format:\n[{"label": "Product A", "value": 35},\n{"label": "Product B", "value": 25},\n{"label": "Product C", "value": 20},\n{"label": "Product D", "value": 20}]\n\nor text format:\nProduct A:35\nProduct B:25\nProduct C:20\nProduct D:20","chartTitle":"Enter chart title...","colorScheme":"default","centerText":"Total","chartSize":"400","innerRadius":0,"outerRadius":0,"startAngle":"0","backgroundColor":"#ffffff","showPercentage":true,"showLegend":true,"showLabels":true,"showTotalInCenter":false,"explodeSlices":false}'

© 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/donut-chart-generator

Parameters

NameTypeRequiredDescription
chartDatatextareaYesData for the donut chart. Supports JSON array or simple label:value text format
chartTitletextNoTitle that will be displayed above the chart
colorSchemeselectNo—
centerTexttextNoText to display in the center of the donut (when showing total)
chartSizenumberNoSize of the square chart in pixels
innerRadiusnumberNoInner radius of the donut in pixels (leave empty for auto)
outerRadiusnumberNoOuter radius of the donut in pixels (leave empty for auto)
startAnglenumberNoStarting angle in degrees (0 = top, 90 = right)
backgroundColorcolorNoBackground color for the chart container
showPercentagecheckboxNoDisplay percentages on the chart slices
showLegendcheckboxNoDisplay a legend below the chart
showLabelscheckboxNoDisplay labels or percentages directly on the donut slices
showTotalInCentercheckboxNoDisplay the total value in the center of the donut
explodeSlicescheckboxNoSeparate slices from each other for emphasis

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-donut-chart-generator": {
      "name": "donut-chart-generator",
      "description": "Generate customizable donut charts (ring charts) from data with various styling options, perfect for showing proportions with a central space",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=donut-chart-generator",
      "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": "donut-chart-generator",
    "arguments": {
  "chartData": "JSON format:\n[{&quot;label&quot;: &quot;Product A&quot;, &quot;value&quot;: 35},\n{&quot;label&quot;: &quot;Product B&quot;, &quot;value&quot;: 25},\n{&quot;label&quot;: &quot;Product C&quot;, &quot;value&quot;: 20},\n{&quot;label&quot;: &quot;Product D&quot;, &quot;value&quot;: 20}]\n\nor text format:\nProduct A:35\nProduct B:25\nProduct C:20\nProduct D:20",
  "chartTitle": "Enter chart title...",
  "colorScheme": "default",
  "centerText": "Total",
  "chartSize": "400",
  "innerRadius": 0,
  "outerRadius": 0,
  "startAngle": "0",
  "backgroundColor": "#ffffff",
  "showPercentage": true,
  "showLegend": true,
  "showLabels": true,
  "showTotalInCenter": false,
  "explodeSlices": false
}
  }
}
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