Data Visualization
Render hierarchical data as a squarified treemap where area encodes each item's share
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/treemap-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"{\n \"name\": \"Budget\",\n \"children\": [\n { \"name\": \"Engineering\", \"value\": 120 },\n { \"name\": \"Marketing\", \"value\": 80 },\n { \"name\": \"Sales\", \"children\": [\n { \"name\": \"Direct\", \"value\": 50 },\n { \"name\": \"Partner\", \"value\": 30 }\n ]}\n ]\n}","chartTitle":"Annual Budget","colorScheme":"default","showLabels":true,"showValues":false,"showPercentages":true,"borderWidth":2}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/treemap-generator| Name | Type | Required | Description |
|---|---|---|---|
| chartData | textarea | Yes | JSON hierarchy: each node has a name, optional value for leaves, optional children |
| chartTitle | text | No | — |
| colorScheme | select | Yes | — |
| showLabels | checkbox | No | — |
| showValues | checkbox | No | — |
| showPercentages | checkbox | No | — |
| borderWidth | range | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-treemap-generator": {
"name": "treemap-generator",
"description": "Render hierarchical data as a squarified treemap where area encodes each item's share",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=treemap-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "treemap-generator",
"arguments": {
"chartData": "{\n \"name\": \"Budget\",\n \"children\": [\n { \"name\": \"Engineering\", \"value\": 120 },\n { \"name\": \"Marketing\", \"value\": 80 },\n { \"name\": \"Sales\", \"children\": [\n { \"name\": \"Direct\", \"value\": 50 },\n { \"name\": \"Partner\", \"value\": 30 }\n ]}\n ]\n}",
"chartTitle": "Annual Budget",
"colorScheme": "default",
"showLabels": true,
"showValues": false,
"showPercentages": true,
"borderWidth": 2
}
}
}Questions or issues? Contact [email protected]