Word cloud

Use it for a quick feel of what people are asking about, such as the words in the last 30 days of conversations. It is good for orientation and weak for exact comparison, so back it with the table view or a ranked list. Words are placed on a spiral, largest first, so they never overlap.

← All charts

Live demo

Made-up data. Try the options, then switch to the empty and one-point states.

Tab into the chart once, then use the arrow keys (or Home and End) to move from item to item; Esc closes the tooltip. On a phone, touch an item.

How to use it

Paste the toolkit from Get the code into your page first, then call the chart like this.

JavaScript
const chart = wordCloud({
  words: [
    { text: 'renew',       value: 186, delta: 14 },
    { text: 'certificate', value: 128, delta: 31, colour: 'var(--c2)' },
    { text: 'refund',      value: 104, delta: -18, colour: 'var(--c1)' }
  ],
  max: 40,
  unit: 'Mentions',
  onClick: w => filterConversations(w.text),
  label: 'Most common words, last 30 days'
});
document.querySelector('#host').append(chart);

Options

What you can pass to this chart.

words

[{ text, value, delta?, colour? }]. Size follows the square root of value; delta is the percentage change, shown in the tooltip.

max

How many words to draw (default 40, largest first). Words that cannot fit are left out.

colour

Default word colour. Give a word its own colour to show rising or falling, as in the demo.

minSize, maxSize

Smallest and largest font size in pixels.

fmt, unit

Value formatter and the noun used in the tooltip and screen-reader label.

onClick

(word) => void. Makes each word a click target.

label / empty

aria-label for screen readers; text shown when there are no words.

Want charts or dashboards like these in your own product?

Tell me what you are trying to see and I can help work out the right approach, from the data behind it to the screen in front of people.