Developer and Data Tools

The Art of Data Visualization: Tips and Tricks

Practical chart design principles: choosing the right chart type, using colour and labels well, and avoiding misleading visuals when showing data to others.

On this page
  1. Start with the question
  2. Choosing a chart type
  3. Keep it simple
  4. Colour
  5. Labels, titles and scales
  6. Avoiding misleading visuals
  7. Handling uncertainty and small samples
  8. A short checklist

Start with the question

A chart is an answer to a question, so decide on the question before opening any software. “How has the temperature in the workshop changed this week?” suggests a different chart from “Which of my three sensors uses the most power?” If you cannot say in one sentence what a chart should show, readers will struggle to see it too.

Also decide who the chart is for. A chart for your own exploration can be rough. A chart for other people needs a title that says what it shows, labels that explain the units, and enough context that someone who has never seen the data can follow it. Which software you draw it in matters less than these choices; a comparison of data analysis tools covers that separate question.

Choosing a chart type

The right chart follows from the kind of comparison you want to make.

  • Change over time: a line chart is the usual choice. The horizontal axis is time, and the line makes trends easy to see. Many sensor readings fit here.
  • Comparing categories: a bar chart lets the eye compare lengths against a common baseline, which people judge well. Sorting the bars by value often makes them easier to read.
  • Parts of a whole: a pie chart can work for a few slices that clearly add up to a total, but comparing similar slices is hard. A bar chart is often easier to read.
  • Relationship between two measurements: a scatter plot shows whether two values move together, and where unusual points sit.
  • Distribution of values: a histogram groups readings into ranges to show how they spread out.
  • Many values at once: a table may be better than a chart. If readers need exact numbers, give them numbers.

When in doubt, choose the simplest chart that answers the question. A fancy chart that impresses and confuses is a poor trade.

Keep it simple

Every mark on a chart should earn its place.

  • Remove decoration that carries no information, such as heavy borders, 3D effects, drop shadows and background images.
  • Use light gridlines, or none, so the data stands out.
  • Do not show too many lines. Five lines on one chart may be fine; fifteen make a tangle. Highlight one and mute the rest, or split into several small charts that share the same axes.
  • Avoid dual axes where possible. Two different scales on one chart let you make the lines appear to track each other almost at will.

Clutter is rarely deliberate. It usually comes from defaults left unchanged.

Colour

Colour is powerful and easy to misuse.

  • Use it with purpose. Colour should mean something: highlighting the important series, separating categories, or showing a range of values.
  • Limit the palette. A handful of distinct colours is easier to follow than a rainbow.
  • Pick the right type of scale. Ordered values suit a sequence from light to dark of one hue. Values that diverge from a midpoint, such as above and below average, suit two contrasting hues meeting at a neutral centre. Unordered categories suit distinct hues.
  • Plan for colour blindness. A sizeable minority of people have difficulty telling certain colours apart, particularly red and green. Do not rely on colour alone; vary line style, add direct labels or use markers.
  • Check contrast. Light text on a pale background or faint lines on white can vanish on a projector or a printout.
  • Be careful with meaning. Red and green carry strong ideas of bad and good in some cultures, but not all, and a reader may read an unintended judgment into your choice.

Labels, titles and scales

Many unclear charts are fixed by better words.

  • Say what the chart shows. A title like “Average daily temperature, kitchen sensor” beats “Temperature”.
  • Label axes and include units. A number without a unit is a puzzle.
  • Label directly. Putting the name next to a line is usually easier than a legend that makes the reader look back and forth.
  • Annotate. If a spike was caused by a door being left open, say so on the chart.
  • Use clear time formats. Make sure readers know whether the axis shows hours, days or something else, and what timezone applies.
  • State the source and period. A short note on where the data came from and how much of it there is adds trust.

Avoiding misleading visuals

Charts can mislead without anyone meaning to. A few common traps:

  • Truncated bar axes. Bars represent length from a baseline, and when the axis starts well above zero, small differences look enormous. Start bar charts at zero. For line charts, a non-zero start can be reasonable, but it should be clear.
  • Stretched aspect ratios. A tall, narrow chart makes a trend look dramatic. A wide, flat one makes it look dull. Pick a proportion that doesn’t exaggerate.
  • Cherry-picked windows. Showing only the days when a trend looks good hides the rest. Show enough history for context.
  • Area and size distortion. If you scale an icon in both width and height to represent a value, its area grows with the square, exaggerating the difference.
  • Missing data hidden. A line that quietly joins across a gap suggests readings that never existed. Show gaps as gaps.
  • Implied causation. Two lines moving together do not prove that one causes the other.
  • Averages that hide spread. A single average can conceal a wide range or a handful of extreme values. Show the spread when it matters.

A useful test is to ask whether someone seeing only the chart would come away with the same conclusion as someone who had seen all the data.

Handling uncertainty and small samples

Data from the real world is noisy. If your measurements have a margin of error, show it or at least mention it. A trend based on five readings deserves less confidence than one based on five thousand. Be wary of smoothing too heavily, because it can hide short events that matter, and of drawing a fitted line through scattered points as if it were certain. Clear thinking about sensor quality and training data quality is as relevant to charts as to models: poor data makes poor pictures, however well designed.

A short checklist

Before sharing a chart, ask:

  1. Does it answer one clear question?
  2. Is the chart type the simplest one that works?
  3. Are the title, axes, units and source stated?
  4. Is every colour and mark doing a job?
  5. Would it still be readable in greyscale or for someone who is colour blind?
  6. Does the axis start somewhere honest?
  7. Could anything in it mislead a reader who has only seconds to look?

Show the draft to someone unfamiliar with the data and ask what they take from it. If their answer is not what you intended, change the chart, not the viewer.

The complete guide to developer and data tools

The Best Tools for Data Analysis and Visualization
Read the guide

Keep exploring

Guides from other topics

All topics →