Why is styling charts important?

  • Default chart styles often include unnecessary clutter or poor colour choices
  • Thoughtful styling improves accessibility and ensures the chart communicates effectively to a wider audience
  • Custom styling helps highlight the most important data and guide attention

It depends on what your purpose is and what your data is, so it’s hard to automate.

Why is styling charts important?

Line chart

Line chart

Why use colours in data visualisation?

  • Colours should serve a purpose, e.g. discerning groups of data

  • Colours can highlight or emphasise parts of your data.

  • Not always the most effective for, e.g. communicating differences between variables.

Types of colour palette

Different types of colour palettes…


… for different types of data.

Examples of sequential, diverging, and qualitative palettes

Is this a good choice of colours?

Consider accessibility

Do symbols or patterns help?

Use intuitive colours where appropriate

Example: red and blue used to show hot and cold

Tip: never switch to the opposite meaning!

Are intuitive colours always best?

Example: pink and blue used to show women and men

Tip: think about colour associations.

Choosing good colours

Don’t rely on colour

  • Use direct labels over a legend if you can
  • Use shapes and patterns and/or small multiples
  • If you have to use a legend, it should follow the order of the data

Choose clear fonts

  • Font size: larger fonts are (usually) better

  • Font colour: ensure sufficient contrast

  • Font face: highlight text using bold font, avoid italics

Tip: Check the contrast of the text colour against the background colour with webaim.org/resources/contrastchecker

Use annotations to add context

  • Give context, such as thresholds or important dates.
  • Highlight what a user should look at.
  • Keep annotations concise and close to the part of the chart they relate to.

Tip: If there’s something specific you want someone to look at, a big arrow pointing at it helps.

Use narrative titles to summarise

  • Describe the main trend you want the chart to show to the user.
  • Users are more likely to understand and remember the main trend from a chart where it is also in the chart title.
  • If the trend described in your chart title is not the most prominent visual trend in the chart, consider what and how you are visualising.

Change in net greenhouse gases removed or emitted by nature over time for different countries

Line chart showing greenhouse gases removed

Scotland had the greatest increase in greenhouse gases captured by nature between 1990 and 2023

Line chart showing greenhouse gases removed

Your turn!

You have been given some data on ocean surface temperatures, and a default line chart.

Improve the chart.

Line chart

nrennie.rbind.io/MFC-CDT-data-viz

Discussion

Line chart

Discussion

Line chart

Discussion

Line chart

Discussion

Line chart

Good charts don’t have to be boring!

Cara Thompson (cararthompson.com)

Stacked diverging bar chart of lego colours

Cedric Scherer (cedricscherer.com)

small multiples are charts of college basketball

Good charts don’t have to be boring!

Tanya Shapiro

Supreme court judges radial waffle chart

Dan Oehm (gradientdescending.com)

Sloped area chart

If you want to design better data visualisations…

  • Know your audience
  • Know your message
  • Design charts to communicate your message to your audience

Resources

Art of Data Viz with ggplot2 cover

Slides: nrennie.rbind.io/MFC-CDT-data-viz


Questions?


nicola-rennie nrennie nrennie nrennie.rbind.io