TapCub is live — analytics, insights and live chat, free on one platform
Analytics

Area Chart vs Line Chart: Reading Stacked Traffic Data

Six weeks of traffic where one source falls under a rising edge and a flat one seems to shrink: how stacked area charts mislead and how to read them.

Chen Yu Published Dec 3, 2026 11 min read Analytics
Sample data: weekly sessions over six weeks; the line readers see above the social band is the total of all three sources.Sample data

An area chart is a line chart with the space down to the baseline filled, so readers see an amount rather than a level. It works best stacked, for parts that add up to a total, with the axis at zero. Only the bottom layer and the total read cleanly; middle and top layers can look like they move when they do not.

What you will learn

  • In a stacked area the top edge is the total, so a falling top series can sit under a rising line
  • A flat middle band looked 21.9% thinner where the layer below climbed steeply in the sample card
  • Start at zero, keep few layers, put the series in question at the bottom and show a table of changes

What is the difference between an area chart and a line chart?

An area chart is a line chart with the space between the line and the baseline filled in. With one series, both show the same points. The fill changes what readers think they are seeing: a line says "this is the level at each moment", while a filled area says "this much of something", so its size has to be truthful from zero. With several series, area charts are usually stacked, and each band's thickness stands for one series while the top edge stands for the total.

Your dataBetter defaultReason
One series over time, such as daily sessionsLineShows direction without implying volume; an axis may start above zero if labeled
One series where the volume itself should register, from zeroLine, or area with a stated reasonThe fill reinforces size but adds no data
Several series compared with each otherLinesEvery line is read against the same axis
Parts that add up to a total over timeStacked area, few layersTotal and rough composition in one view
Composition only, total irrelevant100% stacked areaShares fill the same height

The CDC's chart guidance is strict about when to use them: the data must relate to zero, there should be at least six time periods, and area charts are best avoided for small differences, single series or volatile series. It suggests one to four areas, with six as the maximum. Choosing among traffic chart types more generally is covered in website traffic graphs. This page is about what goes wrong inside a stacked area and how to catch it.

What does the sample traffic look like as numbers?

Sample data: weekly sessions for an online magazine over six weeks, in three sources.

WeekDirect (bottom)Search (middle)Social (top)Total
12,0003,0001,8006,800
22,4003,0001,7007,100
33,3003,0001,5007,800
44,5003,0001,2008,700
55,2003,0009009,100
65,4003,0008009,200

Direct grew 170%. Search did not move at all. Social fell 56%. The total rose 35%. Keep those four facts in mind; a stacked area of this table makes two of them hard to see.

Why can the top series fall while its edge rises?

In a stacked area the upper edge of the top band is not the top series. It is the sum of everything. In the sample, the edge above Social climbs every single week, from 6,800 to 9,200, while Social itself shrinks from 1,800 to 800.

A reader who glances at the green band at the top, sees its upper line rising and concludes social is doing fine has read the total with the wrong label. The only evidence about Social is the vertical thickness of its band, and the thickness is what people judge least comfortably.

Two checks catch this:

  1. For every layer except the bottom one, ask "what is this band's value in the first and last period?" and read it from the data table, not the picture.
  2. Draw a line for the total and label it "total", so no band's edge is mistaken for its own trend.

The bottom layer is the exception. It starts at zero, so its edge is its value: Direct's rise from 2,000 to 5,400 is read correctly at a glance. Heer and Bostock's replication of the classic perception experiments found position along a common scale significantly more accurate than length, and a floating band can only be judged by length.

app.tapcub.com

Total

+35%

6,800 → 9,200

Social

−56%

1,800 → 800

Search

0%

3,000 every week

Social falls while the top edge of the stack rises

Top edge (total)Social alone
W1W2W3W4W5W6
Sample data
Sample data: weekly sessions over six weeks; the line readers see above the social band is the total of all three sources.

Why does a flat series look like it changes?

Search is 3,000 in all six weeks. In the chart its band is lifted by Direct underneath and tilts when Direct climbs steeply. The vertical thickness never changes, but the eye tends to see the shortest distance between the two edges, measured at right angles to them, and that distance shrinks as the slope steepens.

The geometry is simple. If the edges run at an angle θ, the perpendicular width is the vertical width times cos θ. Take a narrow dashboard card 300 pixels wide and 400 pixels tall, with the axis from 0 to 10,000. Search's 3,000 sessions are always 120 pixels tall.

WeeksChange in Direct underneathAngle of the bandPerpendicular widthLooks thinner by
1 → 2+40014.9°115.9 px3.4%
2 → 3+90031.0°102.9 px14.3%
3 → 4+1,20038.7°93.7 px21.9%
4 → 5+70025.0°108.7 px9.4%
5 → 6+2007.6°118.9 px0.9%

A constant series appears to pinch in the middle weeks and recover at the end. This effect is known as the sine illusion or line width illusion. Susan VanderPlas and Heike Hofmann studied it in the Journal of Computational and Graphical Statistics in 2015, reporting that it can significantly change the conclusions viewers draw, especially from seasonal time series.

A wider chart flattens the slopes and weakens the effect. So does moving the volatile series out from underneath: with Search at the bottom, its flatness is obvious.

Which other choices distort an area chart?

A cut axis. Start the axis at 5,000 and the total's filled height goes from 1,800 units in week 1 to 4,200 in week 6, which looks 2.33 times bigger. The real ratio is 9,200 ÷ 6,800 = 1.35. A line chart can survive a cut axis if it is labeled; a filled area cannot.

Overlapping areas. Two unstacked, semi-transparent areas produce a third color where they cross, and a smaller series can vanish behind a larger one. If you want to compare series, use lines.

Smoothing. A smoothed curve can bulge above or below the real values, and some spline types do not pass through every data point. D3's documentation notes that its open basis spline typically does not intersect the points, while its monotone curve passes through them without spurious oscillations. Use straight segments for traffic counts unless you have a reason to smooth, and then use a curve that does not invent peaks.

Gaps. A day when tracking failed is not a day with zero visits. Filled down to zero it reads as a collapse; interpolated across it reads as normal traffic. Leave a visible gap and annotate it.

Values that should not be stacked. Sessions add across sources. Unique visitors often do not, since one person can arrive from two sources. Conversion rates and averages never add.

Too many layers. Past four or five, thin bands become stripes. Group the small sources into "other".

What does a 100% stacked area show, and hide?

Converting each week to shares answers "how did the mix change?"

WeekDirectSearchSocial
129.4%44.1%26.5%
233.8%42.3%23.9%
342.3%38.5%19.2%
451.7%34.5%13.8%
557.1%33.0%9.9%
658.7%32.6%8.7%

Now Search appears to shrink, from 44.1% to 32.6%, although its sessions never changed. The 100% view is correct about share and silent about volume. Pair it with the total, or the first meeting question will be "what happened to search?"

In D3 this is the stack layout with stackOffsetExpand, which normalizes every column so the top reaches one; in spreadsheets it is the percentage stacked area option. The arithmetic is each value divided by its row total.

How should you decide for a report?

  1. State the question in one sentence. "Is total traffic up and what drives it?" suits a stacked area. "How is social doing?" does not.
  2. Put the series in the question at the bottom of the stack.
  3. Start the axis at zero.
  4. Keep to four or five layers and label them on the bands.
  5. Show the total as a labeled line.
  6. If two or more middle series matter, switch to lines or to one small panel per series on a shared scale.
  7. Add a table of first-period, last-period and change under the chart.

For the magazine, the honest summary is the table in step 7: Direct +3,400, Search 0, Social −1,000, total +2,400.

QuestionChartRule
Is total traffic up and what drives it?Stacked areaDriver at the bottom, total labeled
How is one middle source doing?Line chartRead it against zero on its own
Did the mix shift?100% stacked areaShow totals alongside
Which of two sources is ahead?Two linesNo overlapping fills
Exact change per source?TableFirst period, last period, difference

If the question names a series, that series needs a flat baseline.

Where do area charts appear in TapCub?

TapCub draws area charts in several traffic views, and each gives you a way to check the bands against numbers.

TapCub channel mix over time drawn as a stacked area chart by hour, with a toggle between count and share
Demo data: channel mix over time on the Sources report, switchable between count and share.
  1. Web analytics › Overview shows the trend of unique visitors by default and can switch to sessions, pageviews and other metrics, displayed as an area chart, bars or a table. The dashed line is the comparison period. Switch to the table when you need exact values.
  2. Web analytics › Sources has channel mix over time, which can show counts or shares. Read the count view for volume and the share view for mix, and use the channel table below for the figures.
  3. In All-platform analytics › Behavior › Event analysis the trend can be drawn as area, line, bar or stacked bar. If a middle series matters, switch to line, add a breakdown and compare series against one axis.
  4. When tracking broke or a campaign started, mark the date under Configuration › Annotations, so a gap or bump has an explanation on the chart.

The chart will not tell you why Direct grew in the sample. Check the landing pages and campaign tagging first, since untagged links often end up there. The idea of chart choice in general is in data visualization.

FAQ

When should you use an area chart instead of a line chart?

Use it mainly in stacked form, for parts that add up to a total over several periods and are measured from zero. For a single series, a line is usually enough. Use lines to compare several series, to show small variations or whenever the axis cannot start at zero.

What is a stacked area chart?

It places each series on top of the previous one, so band thickness shows each part and the top edge shows the total. Only the bottom band and the total have a fixed reference; the middle bands move with everything beneath them.

Does an area chart need to start at zero?

Yes. The filled region is read as an amount, so cutting the axis exaggerates differences. If you need to zoom in on small changes, use a line chart with a clearly labeled axis that starts higher.

What is the sine illusion in charts?

It is a tendency to judge the gap between two curves by their perpendicular distance instead of the vertical one. Where the curves are steep, a band of constant height looks thinner. Wider charts, direct value labels and putting that series on the baseline all help.

How many series can a stacked area chart hold?

Keep it to about four or five. CDC guidance suggests one to four areas, with six as a maximum. With more, group small series into "other" or split the chart into small panels with the same scale.

Sources

Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Chen Yu

Technical Engineer

Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.

Check every band against its numbers

Trend views as area, bars or table, channel mix in counts or shares, and annotations for gaps and campaigns.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics