PlotSet LogoPlotSet

How to Create a Stacked Bar Chart

A step by step walkthrough for turning a spreadsheet into a published stacked bar chart in PlotSet, from shaping the sheet in wide format to ordering the stack and exporting the result.

About 8 minutes

This guide covers how to create a stacked bar chart from your own spreadsheet, end to end: a published, interactive chart with the segments ordered on purpose and the totals reading correctly, not a copy of the sample data the template ships with. You will shape a sheet into wide format, upload it, map the columns, and decide the one thing that actually changes how the chart reads: which segment sits on the baseline.

Eight minutes is the going rate once your spreadsheet is already one row per category with a column for each segment. Starting from a long format export, one row per category-segment pair, tacks on another five for the pivot PlotSet needs before it reads as a stack. Either way, the click path below is the one a real chart goes through, upload to publish.

The data you need

Wide format, one row per category: the category name in the first column, then one numeric column for each segment. One header row, headers become the legend labels.

Sample CSV
RegionHardwareSoftwareServices
North America420610190
Europe310480150
Asia Pacific260390110
Latin America9014050
Notes

This has to be wide, not long. If your source data has one row per region per product line with a separate "value" column, pivot it in your spreadsheet first so each product line gets its own column.

Column order sets the default stack order, left to right becomes bottom to top (or reverse it in the chart, depending on your layout). Put the segment you want on the shared baseline in the leftmost data column.

Header names become the legend text exactly as typed. Rename "Q1_Rev_Actual" to something a reader recognizes before you upload, since renaming later just means redoing the column mapping.

A blank cell is read as zero, not skipped. If a region genuinely sold no services that quarter, a zero is correct; if the number is just missing, fill it in before the bar's total quietly comes out short.

The steps

The exact click path in PlotSet, from a blank template to a finished chart.

  1. 01

    Open the Stacked Bar Chart template

    From the PlotSet dashboard, start a new project and choose the Stacked Bar Chart template. It loads with sample data already in place, in the wide format PlotSet expects, so you can see the column layout before you touch your own file.

    PlotSet's template picker: chart categories listed down the left, the Bar Charts grid open, and the Bar Chart template card showing its Select button.
    Every guide starts here. Pick the category, then the template: it is the same grid whichever chart type you are after.
  2. 02

    Pivot your sheet into wide format if it isn't already

    One row per category, one column per segment: category in the first column, a number for each segment after it. If your export is long format, one row per category-segment pair, pivot it in your spreadsheet tool first. Uploading long format straight into a stacked chart usually produces one segment per bar instead of a real stack.

  3. 03

    Get your data into PlotSet

    Use the data panel to import a CSV or .xlsx file, paste rows directly from a spreadsheet, or connect a Google Sheet if you want the chart to refresh when the source changes. PlotSet reads the first row as headers and each of those becomes a segment name.

    The PlotSet editor's data view: a spreadsheet grid with Name, Value and Region columns filled with Canadian province figures, beside the Data panel offering CSV upload, Magic Import and Google Sheet sync.
    The data view, shown here on a bar chart project. Upload a CSV, lift the numbers out of an image with Magic Import, or sync a Google Sheet. The panel is identical for every chart type.
  4. 04

    Map the category column and the segment columns

    Confirm which column feeds the category axis and which numeric columns feed the stack. This is usually automatic when your headers are clean, but check it if your sheet carries an extra column, such as a total, that shouldn't be treated as its own segment.

    The PlotSet data panel with the column bindings highlighted: Label/time mapped to column A, Values to column B and Filter/color to column C, with the Auto Binding button below.
    Bindings decide which column becomes the label, which supplies the values and which drives the colour. Auto Binding guesses them from your headers, so check it rather than assume it.
  5. 05

    Order the stack

    Drag the segment you want on the shared baseline to the bottom of the stack order and keep that order identical across every bar. This is the one decision in a stacked chart that actually changes what a reader can compare, so make it deliberately rather than leaving the upload order in place.

  6. 06

    Turn on total labels if the total matters

    If the story is partly about the overall size of each bar, switch on a total label at the end of it. Reading a stacked total off the axis by eye is imprecise once you have more than two segments, so a printed number saves the guesswork.

  7. 07

    Label segments directly and pick a colour per series

    With four segments or fewer, labelling each band directly usually reads faster than a separate legend, since there's no lookup between colour and name. Give each segment its own consistent colour and keep that colour tied to the same segment across every bar, not reassigned per chart.

    The PlotSet editor on the Preview tab: a finished Stacked Bar Chart on the canvas, with the settings panel outlined in red down the right-hand side.
    The Preview tab for a Stacked Bar Chart. Every styling control lives in the outlined panel, each on its own tab: appearance, header, footer and the options specific to this chart type.
  8. 08

    Ship it: publish, embed or export

    Publish for a live, interactive chart with hover tooltips that break out each segment's value, grab the embed code for a page, or export a PNG, SVG or PDF for a deck or report.

Start from the Stacked Bar Chart template with sample data already loaded, then swap in your own.

Open the template

Publish, embed or export it

The last stretch is the same for every chart type: Share turns the chart into a live public link and an embed code, Export writes it out as a static file.

Share: public link and embed code

Activating the embed code and public link publishes the chart. The link is safe to send to anyone, and the embed code drops into any page as an iframe that keeps the hover tooltips and the interactivity. Edit the chart later and hit Recreate to push those changes out to both.

The PlotSet editor toolbar with the Share button highlighted, sitting next to the Export button.
Share is how a finished chart becomes a public link and an embed code.
PlotSet's Share dialog: the toggle activating the embed code and public link, buttons for Link, Embed, Facebook, Reddit, Twitter, LinkedIn and Email, and the public chart link with a Copy button.
Switch on the embed code and public link, then copy the link or take the iframe. Recreate pushes later edits out to everyone already holding it.

Export: SVG, PNG or JPG

Export writes a static copy at whatever size you need. SVG stays sharp at any scale and can still be edited in a design tool; PNG and JPG are the safe choices for slides and documents. The scale multiplier is what gets you a crisp image on a retina screen.

The PlotSet editor toolbar with the Export button highlighted.
Export is the route to a static file for a slide or a report.
PlotSet's Export chart dialog: a 2x scale selector, width and height fields set to 1000 by 600, and the open format menu listing SVG, PNG and JPG.
SVG stays sharp at any size and stays editable in a design tool; PNG and JPG are the safe picks for a deck. Set the scale before you export so the image is crisp on a retina screen.

Styling tips for a Stacked Bar Chart

Bottom-align the segment your reader compares most

Only the bottom band sits on a shared baseline across bars, so it's the only one that can be compared accurately at a glance. If one series is the point of the chart, for example this year's revenue against a backdrop of prior years, put it at the bottom, not buried in the middle of the stack.

Switch to 100% stacked when totals aren't the point

If your bars have wildly different totals and the story is really about the mix, not the size, turn on the 100% stacked option. Every bar normalizes to the same length, which makes the proportions easy to compare and removes the size differences that were distracting from them.

Keep segment colours consistent, not sequential

A sequential colour scale (light to dark) implies an order that a stack of unrelated categories, like product lines or departments, doesn't have. Use distinct, consistent colours per segment instead, and save a sequential scale for when the segments are genuinely ordered, like age brackets.

Roll small segments into an explicit "Other" column

Past five or six segments the thinner bands become hard to read and harder to tell apart by colour. Sum the smallest categories into one "Other" column in your source sheet before uploading, rather than letting PlotSet render eight thin slivers per bar.

Common mistakes when making a Stacked Bar Chart

Every bar shows only one segment instead of a stack

This is almost always a long format upload: one row per category-segment pair rather than one row per category with a column per segment. Pivot the sheet so each segment gets its own column, then re-upload or reconnect the source.

The legend shows raw column headers instead of readable names

PlotSet uses your header row as the segment labels exactly as written, so a header like "seg_2_val" ends up on the chart verbatim. Rename the columns in your source spreadsheet and re-upload, since editing the legend text alone won't survive the next refresh.

A bar's total looks lower than the real number

Check for a blank cell in one of the segment columns for that category. PlotSet reads a blank as zero rather than skipping it, so a missing value quietly shrinks the bar instead of raising an error. Fill in the actual number or confirm zero is correct.

Learn more about the Stacked Bar Chart

Not sure the Stacked Bar Chart is the right choice? See what it is, when to use it and when not to.

About the Stacked Bar Chart

Stacked Bar Chart: common questions

Wide format: one row per category, and one numeric column per segment, with a single header row. That's different from a long format export with one row per category-segment pair, which needs to be pivoted into wide format before PlotSet reads it correctly as a stack.

Make your Stacked Bar Chart now

Free to start with 300+ templates. No credit card required.