PlotSet LogoPlotSet

How to Create a Dumbbell Chart

A step by step walkthrough for turning two columns of before and after numbers into a published dumbbell chart in PlotSet, from shaping the sheet to exporting or embedding the result.

Cerca de 7 minutos

Two dots per category, joined by a line: that is how to create a dumbbell chart from your own spreadsheet, sorted by the size of the change and coloured so a reader can tell which dot is which, and either embedded on a page or exported as an image. Not a demo with placeholder rows, your own categories and your own two numbers, run through the same click path a published PlotSet chart takes.

If your data is already three columns, category and two values, this takes about seven minutes. Add a few more if your numbers are currently spread across two separate rows per category (a long format export) rather than sitting side by side, since that is the one reshape a dumbbell chart actually forces on you before it will draw a connector at all.

Os dados que você precisa

Three columns, one row per category: the category name, the first value, the second value. No separate rows for each value, one header row, and the two value column headers become the legend labels for the two dots.

CSV de exemplo
CountryLife Expectancy 2000Life Expectancy 2023
Japan81.284.1
United States76.679.3
Brazil70.175.6
Russia65.572.7
India62.670.8
Nigeria46.862.6
Anotações

Both values live on the same row. If your export has one row per country per year, a long or tidy format, pivot it into wide format first: one row per country, one column per year. PlotSet cannot pair rows across a stacked layout on its own.

Name the two value columns clearly, for example the actual years or state names rather than "Value 1" and "Value 2". PlotSet uses those header names for the dot legend, and vague headers make a vague legend.

Keep both value columns numeric. If either one has a stray unit, a percent sign or a currency symbol typed into the cell, PlotSet reads it as text and drops the row from the chart instead of plotting it.

A blank cell in either value column means that category has no second dot to connect. Fill it in with the real number or remove the row rather than leaving a half-drawn pair.

Os passos

O caminho exato no PlotSet, de um modelo em branco até o gráfico finalizado.

  1. 01

    Open the dumbbell chart template

    From the PlotSet dashboard, start a new project and choose the Dumbbell Chart template, listed under connected dots. It loads with sample data already bound so you can see the exact three column layout before touching your own file.

    O seletor de modelos do PlotSet: as categorias de gráficos listadas à esquerda, a grade Bar Charts aberta e o card do modelo Bar Chart mostrando o botão Select.
    Todo guia começa aqui. Escolha a categoria e depois o modelo: a grade é a mesma, seja qual for o tipo de gráfico que você quer.
  2. 02

    Shape your sheet into category, value one, value two

    One row per category, with both numbers on that same row. If you exported from a database or a BI tool, check now whether it came out long (one row per category per period) and pivot it wide before moving on.

  3. 03

    Upload the file, or connect it live

    Import a CSV or .xlsx file from the data panel, paste rows straight from a spreadsheet, or connect a Google Sheet so the chart can be refreshed later without a re-upload. PlotSet reads the first row as your column headers.

    A visualização de dados do editor do PlotSet: uma planilha com as colunas Name, Value e Region preenchidas com números de províncias canadenses, ao lado do painel Data, que oferece envio de CSV, Magic Import e sincronização com o Google Sheet.
    A visualização de dados, aqui em um projeto de gráfico de barras. Envie um CSV, extraia os números de uma imagem com o Magic Import ou sincronize um Google Sheet. O painel é idêntico para todos os tipos de gráfico.
  4. 04

    Map the category and two value columns

    Confirm which column feeds the category axis and which two feed the pair of dots. This is usually correct automatically when your headers are clear; check it by hand if your sheet carries extra columns PlotSet had to guess between.

    O painel Data do PlotSet com os vínculos de colunas em destaque: Label/time apontando para a coluna A, Values para a coluna B e Filter/color para a coluna C, com o botão Auto Binding logo abaixo.
    Os vínculos definem qual coluna vira o rótulo, qual fornece os valores e qual comanda a cor. O Auto Binding tenta adivinhá-los a partir dos seus cabeçalhos, então confira o resultado em vez de dar como certo.
  5. 05

    Sort by the size of the gap

    Switch the sort from alphabetical to sort by difference, descending. This is the step that actually makes the chart useful: it turns a list of categories into a ranking of where the change was biggest, which is usually the real question your reader has.

  6. 06

    Colour the two dots and pick a connector style

    Give the first value and the second value clearly different colours, since telling the pair apart is the first thing a reader needs to do. If some categories rose while others fell, colour the connector by direction too, or a mixed chart reads as if everything moved the same way.

    O editor do PlotSet na aba Preview: um gráfico do tipo Dumbbell Chart já finalizado na área de edição e, na lateral direita, o painel de configurações contornado em vermelho.
    A aba Preview de um gráfico do tipo Dumbbell Chart. Todos os controles de estilo ficam no painel contornado em vermelho: aparência, cabeçalho, rodapé e as opções específicas desse tipo de gráfico. Cada grupo fica em sua própria aba.
  7. 07

    Add gap labels and set the value axis

    Turn on the difference label at the end of each connector so the exact change is readable without measuring. The value axis does not need to start at zero here, dots encode position rather than length, so you can trim it to the actual range of your data to make small gaps in large numbers visible.

  8. 08

    Publish it, embed it, or export the pairs

    Publish for a live, interactive chart where hovering a pair shows both values and the difference, grab the embed code for a page, or export a PNG, SVG or PDF if you need a static image for a deck.

Comece pelo modelo de Dumbbell Chart com dados de exemplo já carregados, depois substitua-os pelos seus.

Abrir o modelo

Publique, incorpore ou exporte

A reta final é igual para todo tipo de gráfico: o Share transforma o gráfico em um link público interativo e em um código de incorporação; o Export gera um arquivo estático.

Share: link público e código de incorporação

Ativar o código de incorporação e o link público é o que publica o gráfico. O link pode ser enviado com segurança para qualquer pessoa, e o código de incorporação entra em qualquer página como um iframe que mantém a interatividade e os tooltips ao passar o mouse. Edite o gráfico depois e clique em Recreate para levar essas mudanças aos dois.

A barra de ferramentas do editor do PlotSet com o botão Share em destaque, ao lado do botão Export.
É pelo Share que um gráfico finalizado vira um link público e um código de incorporação.
A janela Share do PlotSet: a chave que ativa o código de incorporação e o link público, os botões Link, Embed, Facebook, Reddit, Twitter, LinkedIn e Email, e o link público do gráfico com um botão Copy.
Ative o código de incorporação e o link público, depois copie o link ou pegue o iframe. O Recreate leva as edições seguintes a todo mundo que já tem o link.

Export: SVG, PNG ou JPG

O Export grava uma cópia estática no tamanho que você precisar. O SVG continua nítido em qualquer escala e ainda pode ser editado em uma ferramenta de design; PNG e JPG são as escolhas seguras para slides e documentos. É o multiplicador de escala que garante uma imagem nítida em uma tela retina.

A barra de ferramentas do editor do PlotSet com o botão Export em destaque.
O Export é o caminho para gerar um arquivo estático para um slide ou um relatório.
A janela Export chart do PlotSet: um seletor de escala em 2x, campos de largura e altura definidos como 1000 por 600 e o menu de formatos aberto com SVG, PNG e JPG.
O SVG continua nítido em qualquer tamanho e editável em uma ferramenta de design; PNG e JPG são as escolhas seguras para uma apresentação. Defina a escala antes de exportar para que a imagem fique nítida em uma tela retina.

Dicas de estilo para um Dumbbell Chart

Label the first and last row directly

A legend tells the reader which colour is which, but putting the actual value names, for example the two years, next to the top pair of dots means most readers never have to look for the legend at all.

Colour by direction when it flips

If some categories increased and others decreased, use one colour for connectors that went up and a second for connectors that went down. Otherwise a reader assumes every pair moved the same way, and about half the chart gets misread.

Trim the axis, but say so

Starting the value axis near your lowest value rather than at zero is normal for a dumbbell chart and makes small differences legible. If the range is genuinely tight, add a line in the caption noting the axis does not start at zero, since a reader skimming fast can otherwise misjudge scale.

Cap it around thirty categories

A dumbbell chart holds far more rows than a grouped bar chart before it gets unreadable, but past roughly thirty pairs the connectors start to blur together. Filter to the categories with the largest gaps and note in the title that it is a subset.

Erros comuns ao fazer um Dumbbell Chart

The chart shows single dots with no connecting line

This almost always means the second value column came in as text rather than a number, often from a stray percent sign or currency symbol in a cell. Check the column's data type in PlotSet's data table and clean the raw values in your source sheet.

Both dots in every pair are the same colour

PlotSet defaulted the two value columns to a single series colour. Open the styling panel and assign the first and second value distinct colours, since a single colour turns the chart into an unlabelled range instead of a comparison.

The pairs will not line up after uploading

The source data is in long format, one row per category per value, instead of wide format with both values on the same row. Pivot the sheet so each category appears exactly once with two value columns, then re-upload.

Saiba mais sobre o Dumbbell Chart

Não tem certeza se o Dumbbell Chart é a escolha certa? Veja o que é, quando usar e quando evitar.

Sobre o Dumbbell Chart

Dumbbell Chart: perguntas frequentes

Three columns and one header row: the category name, then two numeric value columns on the same row, such as a 2000 figure and a 2023 figure for each country. Long format data with a separate row per value needs to be pivoted wide first.

Crie seu Dumbbell Chart agora

Grátis para começar com mais de 300 modelos. Sem cartão de crédito.