---
title: Generate Stacked Graph API
slug: generate-stacked-bar-chart
url: https://apyhub.com/apyhub/service/generate-stacked-bar-chart
provider: ApyHub
categories: [Smart Generation]
tags: [stacked-bar-chart, data-visualization, chart-generation, reporting, dashboard-graphics]
auth: api_key
---

# Generate Stacked Graph API

Create stacked bar chart images from titled data arrays with optional colors and layout settings. Get a pre-signed URL or binary image for reporting and dashboards.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/generate/charts/stacked/url` | What it does Generates a link for a stacked bar chart from the chart configuration in the request b… | 60 |
| POST | `/generate/charts/stacked/file` | What it does Generates a stacked bar chart image from the chart data you provide in the request bod… | 60 |

## About

## What it does
Stacked Bar Chart Generator creates stacked bar chart images from structured chart data. Send a title, a data array, and optional styling options, and get back either a pre-signed chart URL or a binary image depending on the endpoint you use.

Each data item includes a name and an array of values. Each value can include a label, numeric value, and optional 6-character hex color. You can also set the chart theme to light or dark, and adjust canvas size, axis font settings, spacing, bar width, title styling, canvas color, and background padding through the options object.

Use it when you need to render quarterly revenue breakdowns, compare category totals, or generate dashboard graphics from application data. The structure is simple enough to build charts from analytics output, reporting pipelines, or admin tools without assembling the image yourself.

Stacked Bar Chart Generator is useful when your app needs consistent chart output with controlled layout and colors. The `/link` endpoint returns a pre-signed URL in `data`, while `/download` returns the image directly as binary.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/generate-stacked-bar-chart
