Chart Selection Guide¶
The right chart for the wrong question is still the wrong chart. Chart selection is about matching the visual encoding to the data type and the question being asked. This guide gives you a decision framework you can apply in any situation.
Learning Objectives¶
- Apply a chart selection decision framework
- Know when each chart type is appropriate
- Recognise chart misuse and misleading visualisations
- Match chart type to audience and context
The Decision Framework¶
Ask two questions: 1. What type of relationship am I showing? 2. What type of data am I working with?
| Relationship | Chart Types |
|---|---|
| Distribution (how values spread) | Histogram, KDE, boxplot, violin plot |
| Comparison (A vs B vs C) | Bar chart, lollipop, dot plot |
| Trend (how values change over time) | Line chart, area chart |
| Part-to-whole (what share each has) | Pie chart, stacked bar, treemap |
| Correlation (do variables move together) | Scatter plot, bubble chart, heatmap |
| Geospatial (where values occur) | Map, choropleth |
| Flow (how values move between states) | Sankey, funnel |
Distribution — Show How Data is Spread¶
Histogram: continuous data, understand the shape
Best for: "What does the distribution of order values look like?" Avoid when: you have only a few data points (a bar chart is clearer)
Boxplot: summary statistics + outliers, compare groups
Best for: "Do different categories have different order value distributions?" Avoid when: showing to a non-technical audience (they don't know what a box means)
Violin plot: full distribution shape + summary
Best for: Same as boxplot but shows the full shape — useful when distribution has multiple peaks
Comparison — Show Differences Between Groups¶
Bar chart (vertical): small number of categories, values not close together
Best for: "Revenue by product category" Avoid: more than 8-10 bars (becomes unreadable), when values are very similar (differences invisible)
Horizontal bar chart: long category names, many categories
Best for: "Top 15 customers by revenue" (customer names are long)
Dot/lollipop chart: alternative to bar when you want less visual weight
Grouped bar chart: comparing multiple series across categories
fig, ax = plt.subplots()
x = range(len(categories))
ax.bar([i - 0.2 for i in x], q1_revenue, width=0.4, label="Q1")
ax.bar([i + 0.2 for i in x], q2_revenue, width=0.4, label="Q2")
Trend — Show Change Over Time¶
Line chart: continuous time series, shows trend
Best for: "How did daily/monthly revenue change over time?"
Area chart: same as line but fills under the curve — useful for part-to-whole over time
Always start the y-axis at zero for bar charts
A bar chart with a truncated y-axis visually exaggerates small differences. For line charts, starting at zero is less critical — the slope matters more than the absolute height.
Part-to-Whole — Show Composition¶
Pie chart: 2-5 categories, proportions are the message
Use when: the story is "X is more than half" or "Y and Z together dominate" Avoid when: you have more than 5 segments (slices become too small), or differences between slices are subtle (hard to judge angles)
100% stacked bar: part-to-whole across multiple groups or time periods
Best for: "How did the mix of order statuses change month over month?"
Treemap: hierarchical part-to-whole (categories and subcategories)
Correlation — Show Relationships¶
Scatter plot: relationship between two numeric variables
Best for: "Is there a relationship between price and total order value?" Always add a trend line when the relationship exists.
Bubble chart: three dimensions (x, y, and bubble size)
Best for: "Countries by population (size), GDP (x-axis), and happiness score (y-axis)"
Heatmap: correlation matrix or pivot table with many values
Common Chart Mistakes¶
| Mistake | Problem | Fix |
|---|---|---|
| 3D bar/pie charts | Distorts proportions | Use 2D |
| Dual y-axis | Misleading — scales can be chosen to imply any relationship | Use two separate charts |
| Pie chart with >5 slices | Impossible to compare angles | Use horizontal bar chart |
| Truncated y-axis on bar chart | Makes differences look larger | Start y-axis at 0 |
| Rainbow colour scheme | Too many colours, no meaning | Use 2-3 deliberate colours |
| Missing axis labels | Reader can't interpret | Always label axes |
| Too many chart types in one dashboard | Cognitive overload | Stick to 2-3 types |
Analyst wisdom
"A visualisation is a moral act as well as an intellectual act." — Edward Tufte
Misleading visualisations are not just bad design — they lead to bad decisions.
Chart Selection Quick Reference¶
What am I showing?
├── Distribution
│ ├── One variable → histogram, boxplot, violin
│ └── Compare across groups → boxplot/violin per group
├── Comparison
│ ├── Few categories (<8) → vertical bar chart
│ ├── Many categories or long names → horizontal bar chart
│ └── Two periods → grouped bar or small multiple
├── Trend over time
│ ├── Continuous → line chart
│ └── Discrete periods → bar chart
├── Part-to-whole
│ ├── 2-5 parts → pie chart (sparingly)
│ └── More parts or time series → stacked bar
└── Correlation
├── Two variables → scatter plot + trend line
├── Three variables → bubble chart
└── Many pairs → correlation heatmap
Practice Exercises¶
Warm-up 1. You want to show "what percentage of revenue came from each category." What chart type do you use? Build it. 2. You want to show "how revenue changed week over week for 52 weeks." What chart type? Build it. 3. You want to compare average order value across 8 product categories. What chart type? Build it.
Main
4. Your dataset has customer_id, total_orders, total_spend, and days_since_last_order. Choose the best chart for each of these questions:
- Distribution of total_spend
- Relationship between total_orders and total_spend
- total_spend by customer segment
5. Build the three charts from Q4.
6. Your manager asks for a 3D pie chart showing revenue by region. Politely explain why this is a bad choice, then show a better alternative.
Interview Questions¶
[Beginner] When would you use a line chart vs a bar chart for time series data?
[Mid-level] What is wrong with a pie chart that has 12 slices? What would you use instead?
[Senior] A stakeholder requests a dual y-axis chart to show revenue and order count on the same chart. Why is this problematic, and what would you do instead?