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

How to Create a Bar Graph: Seven Steps, Axis Rules and Traffic Examples

How to create a bar graph in seven steps, using a worked traffic-by-channel example: why the axis must start at zero, when to use bars instead of lines, grouped versus stacked bars, and seven common mistakes.

Xu An Published Nov 22, 2026 11 min read Analytics
Sample data: six channels, 10,000 sessions, sorted by value with the axis starting at zero. Organic search and direct together are 68.0% of the total; Email is 1.3 times Social.Sample data

To create a bar graph, put categories and numbers in two columns, sort the bars by value, start the value axis at zero, label each bar directly and write the title as a finding. The zero baseline matters most: in the example below Email is 1.3 times Social, but an axis starting at 900 makes it look 4.0 times as long.

What you will learn

  • Seven steps: two columns, 7 to 10 categories, sort, pick direction, axis from zero, direct labels, title as a finding
  • A truncated axis can make a 30% gap look 4.0 times as long; check by dividing the visual difference by the real one
  • Use bars for separate categories and a few periods; use a line for many ordered periods

Start with the question, not the chart

A bar graph compares a number across separate categories: sessions by channel, orders by product, tickets by team. Before you open a spreadsheet, write the question the chart must answer in one line, because the question decides the sort order, the highlight and the title.

If the question is...Then the bars showSort by
Which channel brings the most visits?Sessions per channelValue, largest first
Did this month beat last month, channel by channel?Two bars per channel (this month, last month)Value of the latest period
Which channels are growing?Change in sessions per channelChange, largest first
How is traffic split?Share of the total per channelValue, largest first

The rest of this guide builds one chart from one question: which channels brought the 10,000 sessions we had last month?

Sample data used throughout:

ChannelSessionsShare of total
Organic search4,20042.0%
Direct2,60026.0%
Email1,30013.0%
Social1,00010.0%
Referral6006.0%
Paid search3003.0%
Total10,000100%

Build the bar graph in seven steps

  1. Put the data in two columns. One column of category names (the channel), one column of numbers (sessions). One row per category, no subtotals, no blank rows. Check that the numbers add up to the total you expect: 4,200 + 2,600 + 1,300 + 1,000 + 600 + 300 = 10,000.
  2. Decide how many categories to show. Seven to ten bars is the practical limit before labels crowd. If you have more, keep the largest and merge the tail into "Other", and say how many categories "Other" holds.
  3. Sort the bars. Order by value unless the categories have a natural order (months, age bands, funnel steps). Sorted bars let the eye read rank instantly; an alphabetical order makes the reader search.
  4. Pick the direction. Use horizontal bars when category names are long (more than about 12 characters) or you have more than seven categories; use vertical columns for short labels or when the categories are periods in time.
  5. Start the value axis at zero. A bar encodes its value in its length, so the base must be zero. This is the rule most often broken and the next section shows what it costs.
  6. Label directly. Print the value at the end of each bar and drop the gridlines and the legend. Readers should not need to trace a line to an axis to read 1,300.
  7. Write the title as a finding. "Organic search and direct brought 68% of last month's sessions" says more than "Sessions by channel". Add the date range and the unit under the title.

Two numbers in the title are enough: for the sample, organic search and direct together are 4,200 + 2,600 = 6,800 sessions, 68.0% of 10,000; the top three channels are 8,100 sessions, 81.0%.

Why the axis must start at zero: good and bad examples

Compare two channels that are close: Email (1,300 sessions) and Social (1,000).

  • True ratio: 1,300 ÷ 1,000 = 1.3. Email is 30% bigger.
  • Axis starting at 900: the bars measure 1,300 − 900 = 400 and 1,000 − 900 = 100 units tall. Email now looks 400 ÷ 100 = 4.0 times as long.

The size of the effect shown in the picture (a 300% difference in bar length) is ten times the size of the effect in the data (30%): 300 ÷ 30 = 10. A simple check for any chart you read is to divide the visual difference by the real difference; anything far from 1 is distortion.

Axis choiceEmail barSocial barLooks likeVerdict
Starts at 01,300 units1,000 units1.3 timesHonest
Starts at 900400 units100 units4.0 timesMisleading
Starts at 0 on a log scalelog₁₀ 1,300 = 3.11log₁₀ 1,000 = 3.001.04 timesHides real gaps; avoid for bars

If differences between bars are small and genuinely matter, do not cut the axis. Show the difference instead (Email minus Social = 300 sessions) or switch to a dot plot, where position along a scale carries the value and a non-zero start is acceptable. The research behind this rule is old and consistent: Cleveland and McGill (1984) ranked position along a common scale as the most accurately judged way to encode a number, ahead of length and angle, and bars rely on position and length.

app.tapcub.com

Sessions by channel, last month

sample, 10,000 sessions
Organic search4,200
Direct2,600
Email1,300
Social1,000
Referral600
Paid search300
Sample data
Sample data: six channels, 10,000 sessions, sorted by value with the axis starting at zero. Organic search and direct together are 68.0% of the total; Email is 1.3 times Social.

Bars or lines: pick by what is on the x-axis

The choice depends on what the horizontal axis holds.

x-axis holdsUseWhy
Separate categories with no order (channels, countries, products)BarsEach category is its own thing; a line would imply a path between them
A few periods to compare (this quarter vs last, four quarters)BarsThe reader compares sizes, not slopes
Many periods in order (daily sessions for 30 days, 12 months)LineThe reader needs the shape and the turning points
Parts of a whole at one momentBars or one stacked barCompare shares

A practical test: if swapping two categories would not change the meaning, use bars. If swapping them would scramble the story (March after May), use a line. Mixed cases exist, for example monthly totals for six months can be bars, but twelve months or more is easier to read as a line, and a line is the right choice for a trend you want the reader to extrapolate.

Chart questionBars showSort by
Which channel brings the most visits?Sessions per channelValue, largest first
Did this month beat last month?Two bars per channelLatest period
Which channels are growing?Change per channelChange, largest first
How is traffic split?Share of totalValue, largest first

Write the question first; it decides sort order, highlight and title.

Grouped and stacked bars: when to add a second dimension

Add a second variable only when the reader's question needs it.

Grouped bars place two or more bars side by side per category. Use them for a direct comparison of two series, for example last month versus this month. Keep to two or three series; four or more turn into a barcode. Sample: Organic search 4,200 last month and 4,620 this month is +420 sessions, or +10.0%; Email 1,300 to 1,170 is −130, or −10.0%. A grouped chart makes both movements visible at once, while two separate charts make the reader remember.

Stacked bars split each bar into parts, for example sessions by device. They answer "how big is the total, and roughly what is it made of?" but only the bottom segment starts at zero, so the reader can compare only that one accurately. If the real question is "which device does better in each channel", use grouped bars or a 100% stacked bar instead.

100% stacked bars show the mix, not the volume. They hide size, so write the total in the label: "Email (n = 1,300)".

Seven mistakes that make a bar graph hard to read

  1. Truncated axis. Shown above, a 10x distortion in the sample.
  2. Unsorted bars. Rank is the first thing readers look for.
  3. 3D bars and shadows. Depth adds no information and makes bar tops hard to read against the grid.
  4. Rainbow colours. If the categories need no distinction, make all bars one colour and highlight the one you discuss in a second colour. Make sure each bar differs from the background by at least 3:1 contrast, the level WCAG 2.2 sets for graphical objects needed to understand a chart.
  5. Gaps wider than the bars, or no gap at all. A gap about half the bar width keeps bars separate without wasting space. (Histograms of continuous ranges are the exception: their bars touch.)
  6. Too many categories. Beyond ten, group the tail. In the sample, the three smallest channels would become "Other: 1,900 sessions (19%)".
  7. Unit and period missing. "Sessions, 1–30 September" under the title costs nothing and prevents the question "of what?".

Build the same chart from your own analytics data

You can apply the steps to any traffic export. A reliable routine is:

  1. Export a table of sessions (or visitors) by channel for a fixed date range.
  2. Remove the total row so it does not become a bar.
  3. Sort descending and check that the sum equals the report total.
  4. Chart it as horizontal bars starting at zero; label the values.
  5. Add one sentence of interpretation in the title.
  6. Repeat on the same range one period earlier if the question is about change, and use grouped bars.

Two data cautions before you chart: use the same counting rule across bars (sessions with sessions), and keep human traffic apart from crawler requests so the longest bar is not a bot. If a channel is missing from the export it will be missing from the chart, so reconcile the sum first.

Build it from channel data in TapCub

Take the sample question, "which channels brought last month's sessions?", and run it in TapCub.

  1. Open Web analytics › Sources and set the date range to the month. The Channels tab groups sessions by channel type using UTM, referrer and click-ID rules, with sessions, visitors, bounce and duration for each row.
  2. Check the counting mode: First source of session (the default) credits each session once to the source it arrived from, so each session is counted in exactly one channel row.
  3. Turn on the period comparison in the report header to read this month against last month before you draw anything.
  4. Export the table from the report (CSV or XLSX) and paste it into your chart tool. Remove the total row, sort, and chart the values as in the steps above.
  5. Click a channel row to filter other reports to it, for example to see which pages brought Email's 1,300 sessions.

TapCub shows the numbers; the drawing and the sentence in the title are yours. TapCub's crawler traffic is reported separately under Web analytics › Bots, so the human numbers you export are not inflated by bots.

FAQ

What are the steps to make a bar graph?

Put categories and values in two columns, limit the categories to seven to ten, sort by value, choose horizontal or vertical bars, start the axis at zero, label the bars directly and write the title as a finding. Check the numbers add up to the total before you chart them.

Should a bar graph's axis always start at zero?

Yes. A bar shows its value through its length, so cutting the base changes the ratio between bars. In the example, Email is 1.3 times Social, but with an axis starting at 900 it looks 4.0 times as long. For small differences, show the difference itself or use a dot plot.

When should I use a bar graph instead of a line graph?

Use bars for separate categories, or for comparing a few periods; use a line for many ordered periods where the trend matters. If swapping two categories would not change the meaning, use bars. If it would scramble the story, such as March after May, use a line.

What is the difference between a bar graph and a histogram?

A bar graph compares separate categories, with gaps between the bars and any order you choose. A histogram counts how many values fall into continuous ranges, such as order values from 0–50, 50–100 and so on, so the bars touch and keep their numeric order.

How many bars are too many?

Beyond about ten bars the labels crowd and the reader stops comparing. Keep the largest categories, merge the rest into "Other", and state how many categories it contains. Switch to horizontal bars if labels are long.

Sources

Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Xu An

Customer Experience Consultant

Writes about live chat, visitor conversations, and self-service, sharing practical ways to make customer communication clearer and more effective.

Get channel numbers ready to chart

Sessions by channel with first-source counting, period comparison and CSV or XLSX export, with crawlers reported separately.

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