Data Trends>Data Visualization

What Is a Line Graph? How It Works and When to Use It

key-takeawayKey Takeaways

  • A line graph shows how a value changes across an ordered sequence, usually time.
  • Use line graphs for trends, and pick another chart for categories or part-to-whole breakdowns.
  • Scatter plots show relationships between two variables, while bar charts compare categories.
  • A non-zero y-axis is fine on a line graph if you mark the break clearly.
  • Aim for about four lines and label them directly, since color alone isn't enough.

You've got a metric that moved, and you need people to see the change fast. When the chart buries that change in clutter, your audience spends the meeting squinting instead of deciding.

This guide covers what a line graph is, when a line chart is the right call, and how it compares to bar and scatter charts. You'll also get design tips that keep your line graphs honest, so the chart answers "what changed, and when?" and you can ask what's next.

What Is a Line Graph?

A line graph, or line chart, plots data points for a measure across an ordered sequence, usually time, and connects them with line segments. With time on the x-axis and your measure on the y-axis, you can see at a glance whether values rose, fell, or held steady.

The National Center for Education Statistics agrees in its NCES line graph guide: line graphs "can be used to show how something changes over time." Each dot is a data point, and each line segment joins one point to the next. You might also hear "linear graph," though in math that term means the plot of a straight-line equation.

How a Line Graph Works

You measure a value at regular intervals, such as revenue each month, plot each measurement, and connect the points in order. Once the points are connected, the slope does the talking.

A steep segment signals fast change, while a flat segment signals very little. Direction matters too: an upward slope shows growth, and a downward slope shows decline.

Context is what turns a line into an answer you can act on. Add a reference line for your target, annotations for events like a product launch, and a dashed segment for forecast values.

What Kind of Data Works on a Line Graph?

Line graphs need a meaningful order on the x-axis, usually continuous data like days, months, or years. The University of Illinois line chart guide explains that a connecting line makes sense when the value existed between measurements, like temperature.

Categorical data works differently, because product types and regions have no natural sequence. Connecting them would suggest values exist between categories, which they don't. Sales by month belongs on a line graph, but sales by fruit type belongs in a bar chart.

Want a closer look at continuous versus categorical data? The histogram vs. bar graph comparison walks through it.

When Should You Use a Line Graph?

Here's a handy shortcut: if your question includes "over time," start with a line graph. The Analysis Function's UK government chart guidance says line charts are "mainly used for time series data."

The same UK government guidance adds that line charts beat clustered bars when you're showing more than one time series. Start from the question, and the chart choice gets easier.

Questions a Line Graph Answers Well

Line graphs shine when you need the shape of change, from stock prices to daily site visits. For a wider view, compare these types of charts and graphs.

  • Trends and direction: See whether monthly revenue is climbing, sliding, or holding flat.

  • Peaks, valleys, and seasonality: Spot recurring patterns, like seasonal swings in housing demand.

  • A few series side by side: Compare school enrollment across three districts over several years.

  • Progress against a goal: Check whether this quarter's pipeline is tracking ahead of last quarter's.

  • Actuals alongside a forecast: Show what happened as a solid line and what's projected as a dashed one.

  • Anomalies: Flag a sudden spike or drop, like a one-day dip in sign-ups.

When a Line Graph Is the Wrong Choice

A line suggests continuity, so it can mislead when your data doesn't have any. In these situations, reach for a different chart.

  • Categorical comparisons: Use a bar chart to compare sales across product types or regions.

  • Part-to-whole breakdowns: Show budget splits with a stacked bar or pie chart.

  • Exact values at one point in time: Use a table for precise numbers on a single date.

  • Sparse data: Plot individual points when you only have three or four measurements.

  • Unordered categories: Skip the line if you could shuffle the x-axis labels without changing the meaning.

Line Graph vs. Bar Graph vs. Scatter Plot

These three charts are easy to mix up, since each one places marks on an x-axis and a y-axis. Here's what each one does best.

ChartBest forX-axis dataWhat you readExample
Line graphChange over time or another ordered sequenceContinuous or ordered (days, months, years)Slope, direction, and shape of the trendMonthly revenue for the past two years
Bar graphComparing discrete categoriesCategorical (products, regions, teams)Length of each barSales by product line this quarter
Scatter plotRelationship between two numeric variablesNumericClustering and correlationAd spend vs. leads for each campaign

Line Graph vs. Bar Graph

Bars compare discrete categories, and each bar's length encodes a quantity. Lines show the shape of change across an ordered sequence, so they suit trends better than side-by-side totals.

If your x-axis is categorical, a bar chart is almost always the better choice, and the complete guide to bar charts covers the details. Lines also save space when you compare several series, since grouped bars for five products over 12 months get crowded fast.

Line Graph vs. Scatter Plot

Both charts start with individual data points on a grid. The NC State LabWrite guide from North Carolina State University explains that in a line graph, "a line is created connecting each data point together."

A scatter plot leaves points unconnected, often with a trend line, to show whether two numeric variables are related. A line graph connects the points in order, so you can read the local change between each pair.

Asking "Are these two things related?" calls for a scatter plot. For "How did this change over time?", use a line graph.

Line Graph Best Practices for Clear, Honest Charts

Small design choices decide whether your audience reads the trend correctly. If you've learned to spot misleading graphs, you know how axis scaling and clutter skew a story. These line graph best practices draw on published guidance.

Does the Y-Axis Have to Start at Zero?

For bar charts, yes, because bar length encodes value and a cut-off axis distorts the proportions. Line graphs are read by slope and shape instead. That's why the same UK government guidance calls a broken y-axis on a line chart acceptable "when necessary."

The Office for National Statistics agrees: its ONS axes and gridlines guidance says line charts can crop the axis if needed. Still, ONS adds that zero is often best when the trend stays clear. Keep the UK government caveat in mind, though: a break can exaggerate trends and small differences.

  • Marked breaks: Add a clear broken-axis symbol and mention the break in your chart description.

  • Room above your data: Where possible, extend the y-axis to the next gridline past your data, per ONS.

  • Regular intervals: Divide the x-axis into equal time segments, even with missing data, per the Illinois guide.

  • Rounded labels: Set gridlines at round-number intervals, like 0, 250, 500, and 750, per ONS.

How Many Lines Should a Line Graph Have?

Probably fewer than you'd guess. The UK government's accessible charts checklist suggests you "aim for a maximum of four lines," since busier line charts get cluttered and hard to understand.

If you need more, the checklist points to small multiples or a focus chart. For gaps in your data, UK government chart guidance says not to join the points on either side of a missing value. Joining them implies you know what happened.

  • Four lines as a starting point: Treat the limit as guidance, and add a line only when it earns its place.

  • Backup cues after direct labels: The Analysis Function color guidance lists dashes, dots, or point shapes. They add clutter, though, and dashes can look like forecasts.

  • Visible gaps: Leave the break where data is missing, and note it in your description.

Using Color and Labels So Everyone Can Read Your Chart

Want readers to find the right line fast? The Illinois guide suggests making your key line "more obvious than any other lines in your chart." A focus chart does that with one strong color and gray for the rest, though the Analysis Function notes its gray falls below 3:1 contrast.

According to the National Eye Institute, about 1 in 12 men have color vision deficiency. The most common type makes red and green hard to tell apart, which is bad news for red-versus-green charts.

The W3C's WCAG use of color guidance says color shouldn't be the only visual means of distinguishing an element. For charts on the web, the W3C's WCAG non-text contrast guidance also sets a 3:1 minimum contrast against adjacent colors. Which parts count? Anything needed to understand the content, such as each line in a graph.

UK government chart guidance also recommends labeling lines directly instead of relying on a legend. For more ways to declutter, see how to improve your visualization design.

  • Direct labels: Put each series name at the end of its line.

  • Text alternative: The W3C complex images tutorial calls for a short description plus a long one, such as a text summary or data table.

How to Make a Line Graph From Your Data

Whichever platform you use, the steps to make a line graph look about the same:

  1. Start with the question you want answered, like "Is churn rising this year?"

  2. Put your time or ordered variable on the x-axis and your measure on the y-axis.

  3. Pick one consistent interval, such as day, week, or month.

  4. Choose an axis range that fits your data, and mark any break clearly.

  5. Add a target line or annotations for events that explain the shape.

  6. Label lines directly, and title the chart with the takeaway, like "Q3 revenue passed target in August."

A dip or spike on a line graph usually prompts a "why?" With Spotter, your AI analyst, you can ask questions in natural language, like "monthly revenue by region for the last 12 months." When an answer raises something new, you can follow up with more questions.

On AI-augmented Liveboards, you can drill from any line into the details without predefined drill paths. ThoughtSpot's AI features also include Anomaly Detection, Alerts, and Forecasting.

Conclusion

A good line graph answers "what changed?" and almost immediately invites "why?" That second question is where your real analysis starts, and a clear, honest chart lets you spend your time on the answer.

Want to ask your data that next question in plain language? Try ThoughtSpot and see where your follow-up takes you.

 

The Leader in Agentic Analytics

2026 Leader

2026 Leader

2026 G2 Enterprise

2026 G2 Enterprise

2026 G2 SMB

2026 G2 SMB

2026 G2 Momentum

2026 G2 Momentum