Chart Types & When to Use Each
Topic 2 of 11 · In Data Visualization · September 9, 2026
Master the complete visual toolkit: line, bar, scatter, heatmap, treemap, waterfall, and more — with clear rules on when each is appropriate and when each fails.
Overview
The Visualization Fundamentals gave you the science. This topic gives you the vocabulary: every major chart type, when each one is the right answer, and — just as importantly — when each one is the wrong answer.
There are over 100 named chart types in the wild, but you need to master roughly 17 to cover 95% of business analysis work. For each, you will learn: what question it answers, what it looks like, when to use it, when to avoid it, and a real-world example. By the end, mapping a business question to the right chart should be automatic.
Before You Start
- Load your retail or superstore dataset with order date, region, category, sales and profit columns in Python or your preferred tool
- Keep the master question-to-chart map visible: trend to line, compare to bar, relationship to scatter, distribution to box or violin, composition to stacked bar or donut
- Be able to build all seventeen core chart types from the previous topic so the misfit test is honest
- Review the pre-attentive hierarchy so you can justify each chart choice with accuracy, not taste
- Prepare one dataset you will deliberately force into a pie chart, a box plot, a Sankey diagram and a waterfall chart to observe the misfits
Learning Objectives
- Map every common business question to its optimal chart type
- Build line, bar, column, area, pie, donut, scatter, and bubble charts from scratch
- Explain when waterfall, funnel, treemap, and Sankey diagrams are appropriate
- Use box plots and violin plots to show distributions and compare groups
- Apply radar charts, bullet charts, and heatmaps for specialized comparisons
- Recognize the limitations and failure modes of each chart type
- Build a personal "question → chart" decision reference card
- Evaluate a chart type choice using the pre-attentive hierarchy from <a href="/data-visualization/viz-fundamentals">Fundamentals</a>
Prerequisites
Complete Visualization Fundamentals — you need to understand pre-attentive attributes and the data-ink ratio before choosing charts.
The Master Question-to-Chart Map
Before looking at individual types, internalize this decision framework. Every business question falls into one of five categories:
| Question Category | Primary Charts | Secondary / Alternatives |
|---|---|---|
| Trend over time | Line chart, area chart | Connected scatter, slope chart |
| Comparison (categories) | Bar chart, column chart | Dot plot, lollipop chart |
| Relationship (2+ numerics) | Scatter plot, bubble chart | Heatmap (binned scatter) |
| Distribution | Histogram, box plot, violin | Density plot, ridge plot |
| Composition (parts of whole) | Stacked bar, 100% stacked, donut | Treemap, waterfall, Sankey |
This table is your 80/20: memorize it and you will never be stuck choosing a chart.
Line & Area Charts: Trends Over Time
Line charts are the gold standard for time-series data. The position of each point along a continuous axis encodes the value — the most accurate pre-attentive attribute.
- Use when: showing change over continuous time (daily revenue, monthly active users, yearly temperature)
- Avoid when: categories are not time-based (use bars instead), or when you have fewer than 4 time points (not enough data for a line)
- Multiple lines: up to 5–7 is readable; beyond that, use a highlight (one accent color, rest gray) or small multiples
Area charts are line charts with the area below filled. They emphasize volume over time, and stacked area charts show composition over time. But stacked areas distort the comparison of middle series — use stacked bars for accurate category comparison.
Slope charts are a special case: two time points connected by a line. They are the most efficient way to show before/after change across categories.
import matplotlib.pyplot as plt
import pandas as pd
# Monthly revenue trend — clean line chart with annotation
months = pd.date_range("2025-01", periods=12, freq="MS")
revenue = [120, 135, 128, 145, 152, 160, 155, 170, 185, 192, 200, 215]
fig, ax = plt.subplots(figsize=(10, 4))
ax.plot(months, revenue, color="#4C72B0", linewidth=2)
ax.fill_between(months, revenue, alpha=0.1, color="#4C72B0")
ax.set_title("Monthly Revenue — 2025", fontsize=14, loc="left")
ax.set_ylabel("Revenue ($K)")
ax.spines[["top", "right"]].set_visible(False)
ax.annotate("Seasonal dip", xy=(months[2], revenue[2]),
xytext=(months[2], revenue[2] + 20),
arrowprops=dict(arrowstyle="->", color="gray"),
fontsize=9, color="gray")
plt.tight_layout()
plt.savefig("line_chart.png", dpi=150)Bar & Column Charts: Comparing Categories
Bar charts (horizontal) and column charts (vertical) encode value by length — the second most accurate pre-attentive attribute after position.
- Use when: comparing discrete categories (regions, products, departments)
- Sort bars by value — never alphabetically unless the category has an inherent order
- Horizontal bars when labels are long (better readability)
- Vertical columns when time is the x-axis (column chart) or when there are few short labels
- Grouped bars for comparing two sub-groups side by side
- Stacked bars for showing composition within each category
Always start the value axis at zero for bar and column charts. A truncated axis on a bar chart distorts the length encoding and is the most common way charts mislead.
Pie, Donut, and 100% Stacked: Composition
Pie charts encode value by angle — the third most accurate encoding. They have strict rules:
- Maximum 5 slices — beyond that, the eye cannot distinguish angles
- Never use 3D — it distorts the perspective
- Sort slices by value, starting at 12 o'clock
- Direct labels — no legends; put the percentage and label on or next to each slice
Donut charts are a pie chart with the center removed. They are aesthetically cleaner and the center can display a KPI number. Same rules apply: ≤5 slices, direct labels.
100% stacked bar/column charts are almost always better than pie charts for composition. They compare proportions across categories using length (more accurate than angle) and support more than 5 categories.
When pies fail: comparing proportions across groups (use stacked bars), showing more than 5 categories (use a treemap or bar chart), or when the exact values matter (use a table or bar chart with direct labels).
Scatter, Bubble, and Heatmaps: Relationships
Scatter plots encode two numeric variables by position on X and Y — the most accurate encoding for relationships.
- Use when: exploring the relationship between two continuous variables (ad spend vs revenue, age vs income)
- Add a trend line (linear or polynomial) to make the pattern visible
- Watch for: non-linear relationships, clusters, outliers, and overplotting (too many points)
Bubble charts add a third variable as the size of each point. They are useful but less accurate than scatter — area is harder to judge than position. Use bubble charts when the size variable is a secondary emphasis, not the primary comparison.
Heatmaps encode a third variable as color intensity on a 2D grid. They are excellent for:
- Correlation matrices (relationship between many numeric variables at once)
- Activity patterns (hour-of-day × day-of-week, or geographic density)
- Large datasets where individual points would overplot
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
# Correlation heatmap — quick, clean, readable
np.random.seed(42)
df = pd.DataFrame({
"ad_spend": np.random.uniform(10, 100, 200),
"signups": np.random.uniform(20, 200, 200),
"revenue": np.random.uniform(50, 500, 200),
"churn_rate": np.random.uniform(0.01, 0.15, 200),
})
df["revenue"] = df["ad_spend"] * 3.2 + np.random.normal(0, 30, 200)
df["signups"] = df["ad_spend"] * 1.8 + np.random.normal(0, 15, 200)
corr = df.corr()
fig, ax = plt.subplots(figsize=(6, 5))
sns.heatmap(corr, annot=True, fmt=".2f", cmap="RdBu_r",
center=0, vmin=-1, vmax=1, ax=ax, square=True)
ax.set_title("Correlation Matrix", fontsize=13, loc="left")
plt.tight_layout()
plt.savefig("heatmap.png", dpi=150)Waterfall, Funnel, and Sankey: Flow & Change
Waterfall charts show how an initial value is affected by a series of positive and negative changes. They answer: "How did we get from A to B?"
- Use for: profit/loss breakdowns, revenue bridges, budget variances, before/after with intermediate steps
- Rule: each bar starts where the previous one ended; positive bars go up, negative bars go down, the total bar starts from zero
Funnel charts show a process with sequential stages where the count decreases at each step. They answer: "Where do we lose people?"
- Use for: sales pipelines (lead → qualified → proposal → closed), user journeys (visit → signup → activate → retain)
- Rule: stages must be sequential and monotonically decreasing; label each stage with the count and percentage
Sankey diagrams show flow from one set of categories to another. They answer: "Where does X go?"
- Use for: user journey flows (which pages lead to purchase), budget allocation (where does revenue go), energy flow (source → use → loss)
- Rule: width encodes volume; keep to ≤10 source categories or the diagram becomes unreadable
Box Plot, Violin, and Ridge: Distributions
Box plots (box-and-whisker) show the distribution of a numeric variable: median, quartiles, range, and outliers in one compact shape.
- Use for: comparing distributions across groups (salary by department, response time by region)
- Read: the box = middle 50% (IQR), the line = median, the whiskers = 1.5× IQR or min/max, dots = outliers
- Avoid when: the audience does not know how to read them — for general audiences, a bar chart of medians with error bars is simpler
Violin plots combine a box plot with a kernel density estimate (KDE) — they show the full shape of the distribution, not just summary statistics.
- Use when: you need to see if a distribution is bimodal, skewed, or has heavy tails
- Pair with: a strip/swarm plot showing individual data points for full transparency
Ridge plots (joy plots) stack multiple density plots vertically, each slightly overlapping. They are excellent for showing how a distribution shifts across ordered categories (e.g., temperature by month).
Treemap, Radar, and Bullet: Specialized Charts
Treemaps encode hierarchical composition as nested rectangles. Area = value. They answer: "How is the whole distributed across categories and subcategories?"
- Use for: budget allocation, market share with sub-segments, file system sizes, product catalog revenue
- Rule: larger rectangles = larger values; color can encode a second metric (e.g., growth rate); label the most important rectangles directly
Radar charts (spider charts) plot multiple variables on axes radiating from a center. They answer: "How does this entity score across multiple dimensions?"
- Use for: competitor comparison (5–8 metrics), skill assessments, product feature scoring
- Limitation: the area of the shape is misleading (perimeter depends on the number of axes). Use only for profile comparison, never for precise value reading
Bullet charts combine a bar with a performance marker (target line) and qualitative ranges (background shading for poor/good/excellent). They answer: "How are we performing against the target?"
- Use for: KPI tracking (revenue vs target, with poor/good/excellent zones)
- Origin: Stephen Few designed them as a compact alternative to gauge charts
Hands-On Practice
Build your personal chart-type reference card:
- For each of the 17 chart types above, build one example in Python (matplotlib/seaborn) or your preferred tool. Use the same dataset — the Superstore or retail sales dataset works well.
- Write a one-line rule for each: when to use it, when not to.
- The misfit test: try to force every dataset into every chart type. Notice which ones look wrong — this builds your intuition for the limits.
- The grayscale test: convert all 17 charts to grayscale. Which survive? Which need color labels or shape encoding to remain readable?
Build one example of each chart type in a Jupyter notebook. For each, write: (1) the question it answers, (2) one thing to watch out for, (3) one real-world use case. This is your permanent reference card.
Deeper Worked Examples
Choosing the charts for a twelve-month retail sales review
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Fixing a mislabelled funnel and a rainbow correlation matrix
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Common Mistakes
- Using a pie chart for 8+ categories (angles become indistinguishable)
- Using a bar chart with a truncated y-axis (distorts the length encoding)
- Choosing a 3D bar chart or 3D pie for "visual appeal"
- Using a line chart for categorical (non-time) data
- Using a scatter plot with 50,000 points and massive overplotting (use a heatmap or density)
- Using a radar chart and claiming area means something (it does not)
- Choosing a waterfall chart when a simple bar chart shows the comparison better
- Using a funnel chart for non-sequential stages (the shape implies order that may not exist)
- Building a box plot for an executive audience who has never seen one
- Forgetting to sort bars by value — unsorted bars force the reader to do the comparison
Real-World Usage
In professional settings, the ability to choose the right chart quickly and defend the choice is what separates a junior from a senior analyst. Interviewers will ask: "You have sales data by region and month — what chart do you build first?" The answer is not "a bar chart" — it is a systematic question-to-chart mapping. This topic's 17-chart vocabulary, combined with the pre-attentive hierarchy, gives you the framework to answer any such question with confidence and evidence.
Mini Project
Business problem: A marketing director wants a quarterly review deck with 5 key visuals. They have data on campaign spend, conversions, revenue by channel, user retention, and regional performance.
Dataset: Use a public marketing dataset (Google Analytics sample, Facebook ads data, or a Kaggle marketing dataset) with at least 5 metrics across multiple dimensions.
Objective: Build 5 different chart types, each answering a different question, each following the question-to-chart map.
Task 1
Task 2
Task 3
Task 4
Task 5
Task 6
Task 7
| Chart | Question | Why This Type |
|---|---|---|
| Line chart | Revenue trend over 12 months | Time-series trend — position encoding |
| Sorted horizontal bar | Top 10 campaigns by conversion | Category comparison — length encoding |
| Scatter + trend line | Ad spend vs revenue relationship | Two numeric variables — position encoding |
| Stacked bar (100%) | Channel mix by quarter | Composition across time — length encoding |
| Waterfall | Revenue bridge: start → upsells → churn → end | Sequential change — how did we get from A to B? |
Key Takeaways
- Map questions to charts: trend → line, compare → bar, relationship → scatter, distribution → box/violin, composition → stacked bar/donut
- Pie charts: ≤5 slices, direct labels, sorted, no 3D
- Bar charts: always start at zero, sort by value, horizontal for long labels
- Scatter plots: the most accurate encoding for two numeric variables
- Waterfalls show change breakdown, funnels show sequential loss, Sankeys show flow
- Box plots for technical audiences, dot plots for general audiences
- Treemaps for hierarchical composition, radar for multi-dimensional profile comparison
- Every chart type has a failure mode — know the limits, not just the strengths
Key Terms & Glossary
| Term | Meaning |
|---|---|
| Question-to-chart map | The decision table that routes each business question — trend, comparison, relationship, distribution, composition — to its primary and alternative chart types. |
| Stacked bar | A bar divided into segments showing composition within each category; the 100% stacked version compares proportions, which beat pie angles for accuracy. |
| Waterfall chart | A chart showing how an initial value is changed by a series of additions and subtractions to reach a closing total, answering how we got from A to B. |
| Sankey diagram | A flow diagram in which the width of each connecting band encodes the volume of flow between source and destination categories. |
| Box plot | A compact distribution summary showing median, quartiles, whiskers at 1.5 times the interquartile range, and outliers; best for technical audiences. |
| Overplotting | Too many points overlapping in a scatter plot so that density is hidden; fixed with a binned heatmap or density plot. |
| Bullet chart | A compact KPI bar with a target marker and shaded poor, good and excellent background zones, designed by Stephen Few to replace gauge charts. |
Learning Resources
FT Visual Vocabulary
The definitive chart-type catalog — maps every question to the best visual encoding with examples.
Data Visualization Catalogue
A searchable gallery of every chart type with detailed use cases, pros, cons, and visual examples.
From Data to Viz
Decision tree for choosing the right chart type — from dataset format to recommended visual.
Chart Selection Cheat Sheet —有问题
Visual guide mapping data types and questions to the best chart types.
Datawrapper Academy
Practical how-tos on building and annotating each chart type for real audiences.
Python Chart Examples — Python Graph Gallery
Python code examples for every chart type using matplotlib, seaborn, and plotly.
Chapter Quiz
Chapter Quiz — Chart Types & When to Use Each
Five questions on the visual toolkit: selecting the right chart for the question and knowing each type's failure mode.
Question 1 of 5
A funnel chart shows lead → qualified → proposal → closed with counts 1000 → 800 → 500 → 150. What rule must hold for it to be valid?
Knowledge Check
End-of-Topic Exam
Hint: Check the line count against the five-to-seven rule, the pie's slice count against the five-slice rule, and the alternatives that use length encoding.
Model answer: Nine lines on one chart exceed the readable five-to-seven limit and force the eye to map nine colours back to a legend. The redesign is small multiples of the top categories' trends, or a single highlight chart with one accent line and the rest greyed. The pie chart fails outright because nine slices make angles indistinguishable; category share belongs in a bar chart sorted by value with direct labels, or a treemap if hierarchy matters. Both replacements use length or position instead of angle, which is the accurate encoding.
Hint: Think about the x-axis type and about the number of time points available.
Model answer: A line chart is wrong when the horizontal axis is not continuous time — for example, plotting regions or departments on the x-axis, where a bar chart is the correct category comparison. It is also wrong with too few time points, such as only three measurements, where the implied continuity between points is meaningless; a few columns or a dot plot is more honest. The line's strength is encoding value by position on a continuous time axis, and that is only a strength when time is really present.
Hint: The chart implies a sequence that may not exist — decide what makes each stage a stage.
Model answer: The danger is that the funnel's narrowing shape implies a causal, ordered sequence — visitors pass through each step — when the middle step is really two separate hand-offs of unknown reliability. Drawing it as one slope fabricates a smooth loss where none is measured. The redraw splits the stage into its two real bars with a gap or separate mini-funnel, each with its own count and conversion, so the audience sees where trust is actually lost rather than reading a false smoothed curve.
Hint: Recall the accuracy hierarchy: position and length beat area, and the third variable in a bubble is only ever a secondary emphasis.
Model answer: A bubble chart does add a third variable, but it encodes that variable by area, which the pre-attentive hierarchy ranks as low accuracy — the eye cannot judge circle sizes to within a few percent. You rarely know whether one bubble is 20% or 35% bigger than another. The scatter's two position axes remain the most accurate channel, so the bubble's third dimension must be treated as emphasis, not as a primary comparison. Only use bubbles when the size variable is secondary and the audience only needs the rough order.