Combo Chart Maker

Renders bar and line series on the same axes, driven by a Type column in the data rather than by chart settings. It reads long format — one row per category and series — which is what most database queries and pivot exports produce.

How to use it

  1. Paste four columns: Category, Series, Value, and Type.
  2. Set Type to bar or line on each row.
  3. Keep every row of a given series on the same type.
  4. Adjust values, pick a theme, and export a PNG.

Long format, and why this tool uses it

The other chart makers here take wide format, with a column per series. This one takes long format: each row carries a category, a series name, a value, and a type. Twelve months of two series is 24 rows rather than 12.

Long format is what a SQL GROUP BY produces, what a pandas melt produces, and what most analytics exports produce, so it often avoids a pivot step. It also makes the type assignment natural, since the type belongs to the series and can simply travel with it.

The one rule the parser enforces is that a series name must have a single type across all its rows. Half a series drawn as bars and half as a line is not a chart, and rather than guessing, the parser rejects it. If two series genuinely need different treatments, give them different names.

Long format also handles ragged data cleanly. If one series has readings for every month and another only for the last six, you simply have fewer rows for the second, with no padding required.

What a combo chart is for

The legitimate use is showing two different kinds of quantity that share an X axis, where the difference in encoding tells the reader they are different kinds of thing.

The classic case is a volume and a rate: revenue as bars and margin percentage as a line, units shipped as bars and defect rate as a line, spend as bars and return as a line. The bars are a quantity that accumulates and the line is a ratio that does not, and using one encoding for both would invite the reader to compare them directly when they are not comparable.

The other good case is actual against target. Bars for what happened, a line for the plan, and the gap between them is the whole message.

What a combo chart is not for is two series of the same kind. If both are revenue figures, draw both as bars or both as lines. Splitting them across encodings implies a distinction the data does not have, and readers will spend effort trying to work out what the distinction is.

The dual-axis problem

Combining a quantity with a rate usually means two different scales, and a secondary axis is the standard answer. It is also the most criticised device in business charting, for a reason worth understanding.

The problem is that the relationship between the two axes is arbitrary. Whoever chooses the ranges chooses where the bars and the line appear to cross, which point looks like a turning point, and whether the two series appear correlated. The same data with different axis bounds tells materially different stories, and neither is more correct than the other.

That does not make dual axes unusable, it makes them something to handle carefully. Label both axes clearly, including units, so the reader knows the encodings are independent. Where a specific crossing point matters, be explicit that the alignment is a choice. And where the two series happen to share compatible ranges, use a single axis and skip the problem.

The alternative that avoids it entirely is two stacked charts sharing an X axis. It uses more vertical space and removes the ambiguity completely, which for an analysis document rather than a slide is usually the better trade.

Ordering and occlusion

Lines are drawn on top of bars, which is the right default: a line hidden behind a bar is invisible, whereas a bar partly crossed by a line is still readable.

With several bar series, the bars are grouped side by side within each category rather than stacked, so each has a zero baseline and the comparison between them is direct. This does consume horizontal space quickly — three bar series across twelve months is 36 bars, at which point individual bars are narrow enough that small differences stop being visible. Fewer categories or fewer series is the fix; making the chart wider only helps up to a point.

Bar charts must start at zero. Since bars encode value as length, a truncated axis misrepresents the ratio between them, and a bar twice as tall as another should mean twice the value. This is the constraint that most often forces a second axis in a combo chart, because the line series may need a truncated range to be legible while the bars cannot have one.

At a glance

Input formatLong CSV: Category, Series, Value, Type
Type valuesbar or line
ConstraintOne type per series name
Bar layoutGrouped, not stacked
Draw orderLines above bars

Frequently asked questions

What columns does it need?

Four: Category, Series, Value, and Type. One row per category-and-series pair.

Can a series be part bar and part line?

No. Each series name must use one type throughout. Give the two halves different names if they genuinely differ.

When is a combo chart the right choice?

When two different kinds of quantity share an X axis — a volume as bars and a rate as a line, or actual against target.

Why are dual axes criticised?

Because the relationship between the two scales is arbitrary, so whoever picks the ranges controls where the series appear to cross.

Are the bars stacked?

No, grouped side by side, so each keeps a zero baseline and bars can be compared directly.

Read more

Charting change over time — Connecting two points asserts that the values between them exist. That assertion is the whole difference between a line chart and a bar chart.

Related chart makers