Chapter 15

Basic Charts - Part 2

Learn line and pie charts with interactive examples

Introduction: Two Essential Chart Types

In this chapter, we'll master two of the most widely used chart types in data visualization:

  • Line Charts: Perfect for showing how things change over time
  • Pie Charts: Ideal for showing parts of a whole

While both are common, each has specific use cases where they excel—and situations where they should be avoided. Let's dive in!

📈 Part 1: Line Charts

What is a Line Chart?

A line chart connects individual data points with a line, showing how a value changes over time or across a continuous sequence.

Best For:

  • Showing change over time (trends)
  • Continuous data
  • Identifying patterns and fluctuations

Data Type:

Time/Sequential (X-axis) + Numerical (Y-axis)

🎯 Real-Life Analogy: Your Daily Temperature

Imagine checking your body temperature every hour when you're sick. Each measurement is a data point. When you connect them with a line, you can see if your fever is going up, going down, or staying steady—that's exactly what a line chart does!

Why Lines Connect the Dots

The line between points implies continuity—the data exists at all points in between, not just at the measured points. This is why line charts work for:

  • ✅ Temperature (exists every moment, even between measurements)
  • ✅ Stock prices (continuously changing)
  • ✅ Website traffic (always some level of activity)
  • ❌ Categories (there's no "in between" Product A and Product B)

Single Line Charts

Track one metric over time to identify trends and patterns.

Example: Daily Temperature Over a Week

30°C 25°C 20°C 15°C 10°C Mon Tue Wed Thu Fri Sat Sun Temperature Trend: Warming Up!

What the chart shows: Temperature gradually increased from Monday to Thursday, then slightly cooled off but remained warmer than the start of the week.

How to Read Line Charts:

  1. Check the axes: X-axis = time, Y-axis = value being measured
  2. Follow the line: Goes up = increasing, goes down = decreasing, flat = stable
  3. Look for patterns: Trends, cycles, sudden changes
  4. Note the scale: Small visual changes might represent big actual changes

Multiple Line Charts

Compare multiple series over the same time period.

Example: Product Sales Comparison (3 Products)

$50K $40K $30K $20K $10K Q1 Q2 Q3 Q4 Product A (Growing) Product B (Stable) Product C (Declining)

What the chart shows: Product A is growing rapidly, Product B remains steady, and Product C is declining—actionable insights for business decisions!

Best Practices for Multiple Lines:

  • Limit to 5-6 lines max - More becomes confusing
  • Use distinct colors - Make each line easily distinguishable
  • Include a legend - Label which line represents what
  • Consider line styles - Solid, dashed, dotted for variety

Line Chart Best Practices

✅ DO

  • Put time on the X-axis
  • Use clear, consistent time intervals
  • Start Y-axis at zero (or clearly mark if not)
  • Label axes clearly with units
  • Use different colors for different lines
  • Add markers for exact values when helpful

❌ DON'T

  • Use for categorical data (use bar chart instead)
  • Show too many lines (creates "spaghetti chart")
  • Use inconsistent time intervals
  • Manipulate Y-axis scale to exaggerate changes
  • Connect unrelated data points

🥧 Part 2: Pie Charts

What is a Pie Chart?

A pie chart is a circular graph divided into slices, where each slice represents a proportion of the whole. The entire pie = 100%.

Best For:

  • Showing part-to-whole relationships
  • Displaying proportions and percentages
  • Simple composition (3-6 categories)

Data Type:

Categorical + Numerical (converted to percentages)

🎯 Real-Life Analogy: Splitting a Pizza

Imagine you order a pizza and split it among friends. If there are 4 friends, each person gets 25% of the pizza (one quarter). A pie chart works the same way—it shows how the whole (pizza) is divided into parts (slices for each person).

When to Use Pie Charts

  • Budget allocation: "How is our $100K budget divided?"
  • Market share: "What percentage does each company hold?"
  • Survey results: "What percentage chose each option?"

Reading Pie Charts

Example: Company Budget Allocation

40% Salaries 25% Marktg 20% Operations 10% R&D 5% Other Total Budget: $100,000

Key Insights:

  • Salaries: $40,000 (40%)
  • Marketing: $25,000 (25%)
  • Operations: $20,000 (20%)
  • R&D: $10,000 (10%)
  • Other: $5,000 (5%)

At a glance: Most budget goes to salaries, followed by marketing and operations.

How to Read Pie Charts:

  1. Larger slice = bigger proportion - Visual size matters
  2. All slices = 100% - The whole pie represents the total
  3. Read percentages - Don't just rely on visual estimation
  4. Compare to identify dominance - Which category is largest?

Donut Charts (Pie Chart Variation)

A donut chart is a pie chart with the center removed, creating a ring shape.

75%

Donut Chart

Can display total/summary in center

Regular Pie Chart

Solid circle, no center space

When to use donut vs. pie: Both work equally well. Donut charts can look more modern and allow you to display a total or key metric in the center.

Pie Chart Best Practices

✅ DO

  • Use for 3-6 categories maximum
  • Order slices from largest to smallest
  • Include percentages on or near slices
  • Use distinct colors
  • Label each slice clearly
  • Ensure all slices add to 100%

❌ DON'T

  • Use for more than 6 categories (too crowded)
  • Compare multiple pies side-by-side
  • Use 3D pies (distorts perception)
  • Use exploded slices (hard to compare sizes)
  • Use for precise comparisons
  • Use for showing change over time

When NOT to Use Pie Charts

Pie charts are often overused. Here are better alternatives:

❌ Too Many Slices (>6 categories)

Problem: Hard to distinguish small slices

Better alternative: Bar chart - easier to compare many categories

❌ Comparing Multiple Pies Side-by-Side

Problem: Can't easily compare slices across pies

Better alternative: Stacked bar chart or grouped bar chart

❌ Showing Change Over Time

Problem: Pie charts are snapshots, not trends

Better alternative: Line chart or stacked area chart

❌ Precise Comparisons

Problem: Hard to visually compare slices of similar size (is 23% bigger than 21%?)

Better alternative: Bar chart with values labeled

🎯 Practice Exercises

Exercise 1: Choose the Right Chart

For each scenario, decide: Line chart or Pie chart?

  1. Monthly website traffic for the past year
    Show Answer

    Line chart - Shows change over time (trend)

  2. How your $500 monthly budget is divided among 5 expense categories
    Show Answer

    Pie chart - Shows part-to-whole proportions for few categories

  3. Comparing revenue of 3 products over 4 quarters
    Show Answer

    Multiple line chart - Shows trends over time for multiple series

  4. Market share of 10 smartphone brands
    Show Answer

    Bar chart (NOT pie) - Too many categories for pie; bar chart allows better comparison

Exercise 2: Spot the Mistakes

Identify what's wrong with these chart uses:

  1. Using a line chart to compare sales across 8 different product categories (not time-based)
    Show Answer

    Mistake: Line charts are for continuous/time data. Categories should use bar charts.

  2. Creating a 3D pie chart with 12 slices
    Show Answer

    Mistakes: (1) Too many slices (max 6), (2) 3D distorts perception. Use bar chart instead.

  3. Comparing 3 pie charts side-by-side to show how budget changed over 3 years
    Show Answer

    Mistake: Hard to compare across pies. Use stacked area chart or line chart for trends over time.

📝 Knowledge Check

Test your understanding of line and pie charts!

1. What type of data is best suited for line charts?

2. What is the maximum recommended number of slices for a pie chart?

3. You want to show how your company's revenue changed month-by-month over the past year. Which chart should you use?

4. What does a pie chart best represent?

5. Why should you avoid using more than 5-6 lines on a single line chart?

6. What's the main problem with 3D pie charts?

7. You need to compare quarterly sales for Products A, B, and C over 2 years. What's the best chart?

8. In a pie chart, all slices should add up to what percentage?

Question 9: Why should you avoid using pie charts when you have more than 5-6 slices?

Question 10: When showing trends over time, what is the advantage of a line chart over a column chart?