Cookies on ons.gov.uk

Cookies are small files stored on your device when you visit a website. We use some essential cookies to make this website work.

We would like to set additional cookies to remember your settings and understand how you use the site. This helps us to improve our services.

You have accepted all additional cookies. You have rejected all additional cookies. You can change your cookie preferences at any time.

Skip to main content

Data over time Line chart

Use a line chart to display trends over time.

Line charts are particularly effective for showing how multiple data series have changed relative to each other.

Important information:

Visual styles for line charts are detailed in our chart style guide on Notion (opens in a new tab) .

Example of a line chart

To avoid overcrowding your line chart with too many lines, consider alternative chart types listed in the Alternatives section of our Clustered bar charts guidance (opens in a new tab) .

Data markers

Avoid using data markers on line charts, unless:

  • you have a small number of data points
  • your data points occur at irregular intervals
  • you are plotting flow data

Irregular and missing data

Irregular data

Use data markers to indicate individual data points when intervals are irregular. This will help users understand the frequency.

Missing data

Leave gaps in the line chart where otherwise regular data is missing to accurately represent the data's continuity.

Provide context

It is often helpful to include comparison data on a line chart. This might be a national average, a five-year rolling average, or data from a previous year. This context can help users to interpret the trends.

Add annotations to highlight significant events or data points. For more information, see our Annotations guidance (opens in a new tab) .

Line charts with a stepped line

Use a stepped line for variables that change at distinct points and remain constant in between, such as interest rates or price caps.

Alternatives

Small multiple line chart

If your line chart is overcrowded, a small multiple line chart may be more suitable.

A small multiple line chart displays each line on a different panel, making trends easier to read and reducing the reliance on colour.

Refer to our guidance on Small multiple charts (opens in a new tab)  for more information.

Stacked area charts and stacked column charts

These charts can be used instead of a line chart when you want to show how parts of a total change over time.

When using stacked area or stacked column charts, follow our Stacked bar charts guidance (opens in a new tab) .

When showing only two time periods

Consider other chart types if you only need to show start and end values. These might be a clustered bar chart, a range plot, or a bar chart highlighting the rate of change.

Use this approach only if it does not hide important trends between the data points.

When showing a small number of data points

If you have five or fewer data points, consider using a column chart.

If you choose a line chart, add data markers to highlight individual points.