Anatomy

One vocabulary for the parts of a chart, used by every chart page in these docs, whatever the library.

Required, conditional, optional

Start with the required parts, add the rest only when the data asks for them.

  • Required: a title, the marks, axis labels, and gridlines on cartesian charts.
  • Conditional: a legend only with more than one series. Axis titles only when the unit is not in the subtitle.
  • Optional: a subtitle, annotations and reference lines.

Each part you add takes attention from the data. If removing a part loses nothing, remove it.

Parts
Each part of a chart, what it is, and when it earns its place.

Title and subtitle

The title says what to see. The subtitle says what was measured.

Write the title as the takeaway, not the topic: "Mobile overtook desktop in May" rather than "Sessions by device". Put the data source, period and units in the subtitle, so the axes can stay short.

Render both as page text above the chart, not inside the chart surface. Page text can be selected, translated and read by a screen reader. See Accessibility for the text alternative that goes with them, and Axes and labels for ticks, gridlines and number formats.