Blog
Charts from data

CSV to stacked bar chart online

Stacked bars answer two questions at once: how big is the total, and what is it made of. Use them when the numbers in a row genuinely add up to something meaningful — revenue split by channel, hours split by project, headcount split by department.

Your data never leaves this device

Your data

Paste a table straight from Excel or Google Sheets, or drop a CSV file. Nothing is uploaded anywhere — the whole calculation runs inside this browser tab.

CSV, TSV or plain text. Files saved in windows-1251 are detected and re-read automatically, so Cyrillic headers do not turn into garbage.

Parsing options

Columns

Result

The drawing library is downloaded only when you press the button, and only on this page.

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Best for A total that splits into 2–5 parts across several categories
Prerequisite The values in a row must sum to a meaningful total. If they do not, use grouped bars.
Segment limit Five is the practical ceiling; thin slices become impossible to read
Reliable comparison Only the total and the bottom segment. Middle segments float and cannot be compared by eye.
Zero baseline Mandatory and structural — the stack is built from zero upward
Output PNG at 2× scale, plus CSV, JSON and Markdown

When it misleads you

How it is calculated

The label column defines the bars. Every remaining numeric column becomes a segment, stacked from the bottom in the order the columns appear in your table. The height of the whole bar is the sum of the row.

Segment order matters more than it looks. The bottom segment is the only one that can be compared reliably across bars, because it is the only one anchored at zero. Put the series that matters most first in your table.

The axis starts at zero because the stack is physically built upward from zero; there is no meaningful way to truncate it without destroying the arithmetic the chart depends on.

Empty cells count as absent, not as zero, and simply contribute nothing to the stack. The total shown is the sum of the values that actually exist, which is why a row with a missing part produces a shorter bar rather than a wrong composition.

Questions and answers

Why can I not compare the middle segments?

Because they do not share a baseline. In one bar a segment might start at 400 and in the next at 610, and the eye cannot compare two lengths that begin in different places. If a middle segment is the point of your chart, give it its own bar chart or line.

Should I use stacked or 100% stacked?

Stacked when the size of the total matters as much as the split. 100% stacked when only the proportions matter and the totals are a distraction — for example when comparing periods of very different size.

My smallest segment is invisible.

That is the format telling you something. Either merge the tiny categories into an "other" segment, or show the composition as a separate chart where small values have room.

Can I stack negative numbers?

Not meaningfully. Stacks assume every part adds to the total. For data with positive and negative contributions, use a waterfall chart instead.

Does anything leave my computer?

No. There is no server behind this page; the whole chart is built locally in your browser.

The opposite tool

Need it the other way round? 100% stacked chart Shares of the whole, with the totals deliberately removed

Related tools

All tools