Data Visualization
Generate stacked area charts showing cumulative trends of multiple data series, perfect for visualizing total trends and component contributions
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/stacked-area-chart' \
-H 'Content-Type: application/json' \
-d '{"chartData":"Multi-series JSON:\n{"labels": ["Jan", "Feb", "Mar"],\n "series": [\n {"name": "Product A", "data": [100, 150, 120]},\n {"name": "Product B", "data": [80, 110, 140]},\n {"name": "Product C", "data": [50, 70, 90]}\n ]\n}\n\nor single series JSON:\n[{"label": "Jan", "value": 100}, {"label": "Feb", "value": 150}, {"label": "Mar", "value": 120}]","chartTitle":"Enter chart title...","curveType":"smooth","areaColors":"#3b82f6,#10b981,#f59e0b","fillOpacity":"0.6","backgroundColor":"#ffffff","gridColor":"#e0e0e0","lineWidth":"2","chartHeight":"400","maxValue":0,"minValue":"0","xAxisLabel":"Category","yAxisLabel":"Value","showGrid":true,"showPoints":false,"showValues":false,"showTotalLine":true,"normalizeData":false,"showLegend":true}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/stacked-area-chart| Name | Type | Required | Description |
|---|---|---|---|
| chartData | textarea | Yes | Data for the stacked chart. Supports multi-series JSON for stacking or single series array |
| chartTitle | text | No | Title that will be displayed above the chart |
| curveType | select | No | — |
| areaColors | text | No | Colors for multiple areas (comma-separated hex colors). Leave empty for default colors. |
| fillOpacity | text | No | Opacity of the area fill (0.1 to 1.0) |
| backgroundColor | color | No | Background color for the chart container |
| gridColor | color | No | Color for the grid lines |
| lineWidth | number | No | Width of the area boundary lines in pixels |
| chartHeight | number | No | Height of the chart in pixels |
| maxValue | number | No | Maximum value for Y-axis (leave empty for auto-scale) |
| minValue | number | No | Minimum value for Y-axis |
| xAxisLabel | text | No | Label for the X-axis |
| yAxisLabel | text | No | Label for the Y-axis |
| showGrid | checkbox | No | Display grid lines for better readability |
| showPoints | checkbox | No | Display data points on the areas |
| showValues | checkbox | No | Display the actual values on data points |
| showTotalLine | checkbox | No | Display a line showing the cumulative total |
| normalizeData | checkbox | No | Convert values to percentages showing relative contribution |
| showLegend | checkbox | No | Display a legend below the chart |
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-stacked-area-chart": {
"name": "stacked-area-chart",
"description": "Generate stacked area charts showing cumulative trends of multiple data series, perfect for visualizing total trends and component contributions",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=stacked-area-chart",
"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": "stacked-area-chart",
"arguments": {
"chartData": "Multi-series JSON:\n{"labels": ["Jan", "Feb", "Mar"],\n "series": [\n {"name": "Product A", "data": [100, 150, 120]},\n {"name": "Product B", "data": [80, 110, 140]},\n {"name": "Product C", "data": [50, 70, 90]}\n ]\n}\n\nor single series JSON:\n[{"label": "Jan", "value": 100}, {"label": "Feb", "value": 150}, {"label": "Mar", "value": 120}]",
"chartTitle": "Enter chart title...",
"curveType": "smooth",
"areaColors": "#3b82f6,#10b981,#f59e0b",
"fillOpacity": "0.6",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"lineWidth": "2",
"chartHeight": "400",
"maxValue": 0,
"minValue": "0",
"xAxisLabel": "Category",
"yAxisLabel": "Value",
"showGrid": true,
"showPoints": false,
"showValues": false,
"showTotalLine": true,
"normalizeData": false,
"showLegend": true
}
}
}Questions or issues? Contact [email protected]