Native Web Components playground

Nova v3.38.0

Preview

Web Components

Chart foundations

The rules every Nova chart shares: layout, sizes, axes, legend, colour and accessibility.

The rules every Nova chart shares: layout, sizes, axes, legend, colour and accessibility.

Every Nova chart shares the same foundations: how it is laid out, how it reads and how it stays accessible. Each chart's own page only covers what it adds or does differently.

Principles#

Every chart follows the five principles from Chart Quality. The foundations below put them into practice.

  • Clarity: understood at a glance. Labels thin out instead of overlapping.
  • Context: a title, axis titles and units say what the numbers are.
  • Simplicity: few series, few categories. Split the chart before it gets crowded.
  • Relevance: the data answers a real question someone has.
  • Consistency: the same layout, palette order and text styles on every chart.

Anatomy#

Every chart is built from the same parts. The marks change from chart to chart; the frame around them doesn't.

A column chart titled ‘Wind output fell 30 GWh in February’, with numbered markers on its title, subtitle, plot area, axes, bars, value labels and legend.
No.PartWhenWhat it does
1FrameAlwaysHolds the chart and sets its size.
2TitleRecommendedStates the takeaway.
3SubtitleComingPeriod, unit and source.
4Plot areaAlwaysWhere the marks are drawn.
5MarksAlwaysWhat each value becomes: a bar, a line, a cell. Defined on each chart page.
6Value axisMost chartsThe numeric scale.
7Category axisMost chartsThe items, periods or points.
8Axis titlesRecommendedName what each axis measures, with its unit.
9GridlinesOn by defaultHelp read values across the plot.
10LegendOn by defaultNames each series.
11Value labelsOptionalPrint exact values next to the marks.

Layout and sizes#

A chart stacks its parts vertically: the title, then the legend if it sits on top, then the plot, then the legend in its default place at the bottom. The plot takes all the space that's left, so adding a title or a legend shrinks the plot, never the frame.

The frame has 24 px of padding on every side and square corners. Align the frame's edge with the content around it.

Sizes#

Use one of the three preset sizes so charts line up on a page. Custom sizes work between the minimum and the maximum.

The three chart sizes side by side: S at 480 × 300 px, M, the default, at 720 × 420 px, and L at 1040 × 560 px.
SizeWidth × heightUse for
S480 × 300 pxSide panels, small dashboard tiles
M (default)720 × 420 pxMost pages and dashboard cards
L1 040 × 560 pxA chart that is the main content of a page
Minimum200 × 150 pxBelow this a chart can't be read
Maximum4 000 px either sideLarger charts are refused

Title and subtitle#

The title says what the reader should take away, in values. It sits on one line; a longer title is cut with "…", so keep it short. With no title, the header disappears and the plot gets the space.

Do
A chart titled 'Wind output fell 30 GWh in February' with a subtitle giving the period and unit.

State the takeaway, with the number: "Wind output fell 30 GWh in February".

Don't
The same chart titled only 'Wind output'.

Name only the topic: "Wind output". The reader has to find the point.

A subtitle under the title will carry the period, the unit and the source. It is coming soon.

Axes#

Nova axes have no axis line and no tick marks. The tick labels and the gridlines carry the scale, which keeps the chart light.

Value axis#

  • Steps are round numbers. The axis picks about five even steps, like 0, 100, 200, 300, 400. You can set your own start, end and step.
  • Marks that show a value by their length start at zero. Cutting the axis above zero makes small differences look large. Marks that show a value by their position, like a line, may start elsewhere, because a trend reads from its range.
  • Use a fixed range when its ends mean something, like 0 to 100 % for shares.
  • Labels never overlap. When steps are too close, only every second or third step gets a label. Every gridline stays.
  • At most 40 gridlines. A smaller step than that is refused.
Do
Three bars on an axis from 0 to 100 in steps of 50.

Use round steps that start at zero: 0, 50, 100.

Don't
The same three bars on an axis starting at 47, which makes the third bar look tiny.

Use odd steps or cut the axis above zero: 47, 69, 91. A bar can look ten times smaller than it is.

Category axis#

  • Categories keep the order of the data, unless a chart offers sorting.
  • Labels longer than 14 characters are shortened with "…". Prefer short labels to begin with.
  • When categories are an ordered sequence, like dates, the first and last are always labelled.

Axis titles#

The value-axis title names the measure and carries the unit in brackets: "Output (GWh)". The vertical title reads bottom to top on the left. Don't hide axis labels: the reader loses the scale.

Gridlines#

Gridlines run along the value axis only, one per step, thin and light. They help read a value across the plot without competing with the marks. The gridline at zero acts as the baseline. Charts whose marks already form a grid have none.

Legend#

  • Below the plot by default; it can move above it. It is centred on the plot, not on the frame.
  • Each swatch looks like the series it names: a dot of colour, a pattern, or a short line with its dash.
  • Name what the series represents, in a word or two. Never name its colour.
  • Keep names short. Today, entries that don't fit on one row are hidden.
Do
A chart whose legend reads 'Solar' and 'Wind'.

Name what the series is: "Solar", "Wind".

Don't
The same chart whose legend reads 'Orange bars' and 'Grey bars'.

Name the colour: "Orange bars", "Grey bars". Not everyone sees it, and it says nothing.

Value labels#

Value labels print the exact number next to a mark, 4 px away, in a smaller text size. They are off by default. Turn them on when a few exact values matter; leave them off on dense charts, where they turn into noise. Each chart page says where its labels sit.

Units and numbers#

  • Always show the unit. By default it sits in brackets after the value-axis title: "Output (GWh)". With no axis title it still shows: "(GWh)".
  • You can also add it to every axis step or every value label.
  • Word units take a space: "340 GWh", not "340GWh".
  • Numbers follow the user's locale (decimal comma or point, thousands separator), as for all data in Nova. See Numbers, Dates & Time.

Colour#

Series colours#

Nova has ten chart colours, used in a fixed order: the first series always gets the first colour, the second the second, and so on. That keeps the same series looking the same across charts on one page. Ten is the maximum number of series.

The ten chart colours in order, numbered 1 to 10, starting with orange, dark grey and petrol.

Never colour alone#

Colour is never the only thing that tells two series apart. Each chart adds a second cue: a fill pattern, a line dash, or printed values. Each colour also reaches 3:1 contrast against the background.

Do
Stacked bars where the top series has a diagonal stripe pattern as well as its own colour.

Add a pattern or a dash as well as colour.

Don't
Stacked bars told apart only by red and green.

Rely on colour alone, and never pair red with green.

Colour scales#

When colour shows a value instead of a series, use a scale. A sequential scale runs from light to strong for values that go one way, like load or consumption. A diverging scale runs from one hue through a neutral midpoint to another, for values around a reference, like a gain or a loss. Use 3, 5 or 7 steps; fewer steps are easier to tell apart.

Accessibility#

  • Not colour alone: see Colour above.
  • Contrast: marks reach 3:1 against the background; text reaches 4.5:1.
  • Units: a chart is never shipped without a way to read its values.
  • Text alternative: every chart has a short written summary for screen readers. Coming soon.
  • Data table: the same data can be shown as a table. Coming soon.

Writing the text alternative#

  1. Type and title: what kind of chart, and its title.
  2. Main message: the takeaway, in real values. No "huge" or "slightly".
  3. Axes: horizontal first, what each shows and its range.
  4. Series: what they represent, never their colour.

Bar chart: Wind output fell 30 gigawatt hours in February. Wind produced 340 gigawatt hours in January and 310 in February; solar rose from 120 to 150. Horizontal axis: month, January to February. Vertical axis: output, 0 to 400 gigawatt hours. Two series: Solar, Wind.

Write units out in full ("gigawatt hours", not "GWh"): screen readers spell abbreviations letter by letter.

Limits#

Past these, a chart stops being readable, so the tools refuse or warn.

  • Series: 10 at most. Each chart may recommend fewer.
  • Data points: 2 000 at most. Group or filter the data first.
  • Size: from 200 × 150 px to 4 000 px either side.

The tools also warn when a chart has no title, no unit, hidden axis labels, empty values or two series with the same name.

Not defined yet#

These parts are still being designed and will be added here:

  • States: loading, empty, partial data and error.
  • Interaction: tooltips, hover and keyboard navigation.
  • Annotations: reference lines, targets and thresholds.