PlotSet LogoPlotSet

How to Create a Treemap

A step by step walkthrough for turning a spreadsheet into a published treemap in PlotSet, from shaping the category and parent columns to exporting or embedding the finished tiles.

Environ 8 minutes

This is how to create a treemap in PlotSet from your own spreadsheet: tiles sized by value, grouped by hierarchy, coloured on purpose, then published as a live embed or exported as an image. Your own rows go through the same upload-to-publish path a real PlotSet treemap takes, including the one column that trips people up: the parent.

If your spreadsheet already has a category, a parent and a value in three columns, eight minutes gets the whole thing done. Pulling the data out of a pivot table first adds another five, since pivot exports usually carry subtotal rows that need to come out before the tiles will size correctly.

Les données dont vous avez besoin

Three columns, one row per tile: the category name, its parent group (blank for a top-level tile), and a positive number. One header row, no subtotal rows.

Exemple de CSV
CategoryParentRevenue
North America4200000
Europe3100000
Asia Pacific1800000
United StatesNorth America3300000
CanadaNorth America900000
GermanyEurope1400000
FranceEurope900000
United KingdomEurope800000
JapanAsia Pacific1100000
AustraliaAsia Pacific700000
Remarques

Leave the parent column blank for a top-level row, not filled with a placeholder like "None" or "Top". A blank cell is how PlotSet knows a tile has no ancestor; a text placeholder gets read as an actual parent name and adds a stray tile.

Every value must be zero or greater. A negative revenue or a loss row will not render as a tile, since a rectangle cannot have negative area, so pull those rows into a separate table before you upload.

If you are working from a pivot table, delete the grand total and subtotal rows first. A "Total" row uploaded alongside real categories becomes a tile of its own, usually the largest one on the page.

A flat treemap with no hierarchy works too: just leave the Parent column out entirely, or leave every cell in it blank, and every row becomes a top-level tile.

Parent names have to match a Category value exactly, including case and spacing. "north america" in the Parent column will not find "North America" in Category, and that child tile gets dropped.

Les étapes

Le parcours exact dans PlotSet, d'un modèle vierge à un graphique terminé.

  1. 01

    Open the treemap template

    From the PlotSet dashboard, start a new project and choose the Treemap template. It loads with sample data already bound, tiled by category, parent and value, so you can see the exact three-column shape before you swap in your own file.

    Le sélecteur de modèles de PlotSet : les catégories de graphiques listées à gauche, la grille 'Bar Charts' ouverte et la carte du modèle 'Bar Chart' affichant son bouton 'Select'.
    Chaque guide commence ici. Choisissez la catégorie, puis le modèle : c'est la même grille quel que soit le type de graphique visé.
  2. 02

    Shape your sheet into category, parent and value

    One row per tile: its name, the group it sits inside, and its size. If your source is a pivot table or a finance report, pull those three fields out into a plain flat sheet first. No merged cells, no subtotal rows.

  3. 03

    Upload the sheet or connect a live one

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

    La vue données de l'éditeur PlotSet : une grille de tableur dont les colonnes 'Name', 'Value' et 'Region' sont remplies de chiffres par province canadienne, à côté du panneau 'Data' qui propose l'import d'un CSV, 'Magic Import' et la synchronisation d'une Google Sheet.
    La vue données, ici sur un projet de graphique en barres. Importez un CSV, extrayez les chiffres d'une image avec 'Magic Import' ou synchronisez une Google Sheet. Le panneau est identique pour tous les types de graphique.
  4. 04

    Map the category, parent and value columns

    Confirm which column feeds the tile name, which one feeds the parent group, and which one sizes the tile. PlotSet usually guesses right when your headers are clear, but check it manually if your sheet has extra columns sitting between them.

    Le panneau de données de PlotSet avec les associations de colonnes mises en évidence : 'Label/time' affecté à la colonne A, 'Values' à la colonne B et 'Filter/color' à la colonne C, et le bouton 'Auto Binding' juste en dessous.
    Les associations déterminent quelle colonne devient l'étiquette, laquelle fournit les valeurs et laquelle pilote la couleur. 'Auto Binding' les devine à partir de vos en-têtes : vérifiez-les plutôt que de les tenir pour acquises.
  5. 05

    Check the hierarchy renders the way you expect

    Look for a top-level tile that is really a stray parent name, or a child tile that vanished because its parent value did not match exactly. Fix mismatches in the source sheet and re-upload rather than patching the chart by hand.

  6. 06

    Colour by group, not by size

    Size is already spoken for by the tile's area. Set the colour scale to the parent group so the hierarchy reads at a glance, or switch it to a second numeric column, growth rate or margin, if you want colour to carry a different story than area does.

    L'éditeur PlotSet sur l'onglet 'Preview' : un graphique Treemap terminé sur le canevas, avec le panneau de réglages entouré en rouge le long du bord droit.
    L'onglet 'Preview' pour un graphique Treemap. Tous les réglages de style se trouvent dans le panneau entouré en rouge : apparence, en-tête, pied de page et les options propres à ce type de graphique, chacun dans un onglet distinct.
  7. 07

    Turn on labels for the tiles big enough to hold them

    PlotSet hides labels automatically once a tile gets too small to fit text without overlapping its neighbours. Leave that behaviour on rather than forcing every tile to label, and rely on the hover tooltip to surface the exact value for the small ones.

  8. 08

    Publish, embed or export the tiles

    Publish for a live interactive treemap with hover tooltips and a shareable link, grab the embed code to drop it into a page, or export a PNG, SVG or PDF if you need a static image for a deck or a report.

Partez du modèle Treemap avec des données d'exemple déjà chargées, puis remplacez-les par les vôtres.

Ouvrir le modèle

Publier, intégrer ou exporter

La dernière ligne droite est la même pour tous les types de graphique : 'Share' transforme le graphique en lien public actif et en code d'intégration, 'Export' l'enregistre sous forme de fichier statique.

Share : lien public et code d'intégration

Activer le code d'intégration et le lien public revient à publier le graphique. Le lien peut être envoyé à qui vous voulez sans risque, et le code d'intégration s'insère dans n'importe quelle page sous la forme d'une iframe qui conserve les infobulles au survol et l'interactivité. Si vous modifiez le graphique par la suite, cliquez sur 'Recreate' pour répercuter ces changements sur le lien comme sur le code.

La barre d'outils de l'éditeur PlotSet avec le bouton 'Share' mis en évidence, juste à côté du bouton 'Export'.
C'est par 'Share' qu'un graphique terminé devient un lien public et un code d'intégration.
La fenêtre 'Share' de PlotSet : l'interrupteur qui active le code d'intégration et le lien public, les boutons 'Link', 'Embed', Facebook, Reddit, Twitter, LinkedIn et Email, et le lien public du graphique avec un bouton 'Copy'.
Activez le code d'intégration et le lien public, puis copiez le lien ou récupérez l'iframe. 'Recreate' répercute vos modifications ultérieures sur le lien et le code déjà partagés.

Export : SVG, PNG ou JPG

Le bouton 'Export' génère une copie statique à la taille dont vous avez besoin. Le SVG reste net à toutes les échelles et peut encore être modifié dans un outil de design ; PNG et JPG sont les choix sûrs pour les présentations et les documents. C'est le multiplicateur d'échelle qui vous donne une image nette sur un écran retina.

La barre d'outils de l'éditeur PlotSet avec le bouton 'Export' mis en évidence.
C'est par 'Export' que vous obtenez un fichier statique pour une diapositive ou un rapport.
La fenêtre 'Export chart' de PlotSet : un sélecteur d'échelle réglé sur 2x, les champs de largeur et de hauteur à 1000 × 600, et le menu des formats ouvert, affichant SVG, PNG et JPG.
Le SVG reste net à toutes les tailles et modifiable dans un outil de design ; PNG et JPG sont les choix sûrs pour une présentation. Réglez l'échelle avant d'exporter pour que l'image soit nette sur un écran retina.

Conseils de style pour un Treemap

Group the long tail into one tile

If your data has three big categories and forty tiny ones, the tiny ones will shrink into unreadable slivers regardless of how you colour them. Sum the small rows into a single "Other" row before upload, and mention in a caption what it covers.

Use colour for the second variable you actually care about

A treemap gives you two channels to work with: area for value, colour for anything else. Wasting colour on the same value the area already shows (a common default) throws away half the chart's power. Try colouring by year-over-year change instead.

Keep the hierarchy to two levels

PlotSet will nest a third level, but by the time tiles are three groups deep, individual rectangles are too small to compare or even see. If your data goes deeper, pick the two levels that matter most to the reader and flatten the rest.

Name the "Other" bucket specifically

"Other" on its own reads as a shrug. "Other: 14 regions under $50k" tells the reader exactly what got folded in and why it is not broken out, without them needing to ask.

Erreurs courantes en créant un Treemap

A tile is missing even though the row is in the sheet

The parent name in that row almost certainly does not match a category value exactly, often a trailing space or a different capitalisation. Compare the two columns directly in the spreadsheet, fix the mismatch, and re-upload rather than editing inside PlotSet.

One enormous tile dominates the whole treemap

This is usually a subtotal or grand total row from a pivot export that got uploaded as if it were a real category. Scroll to the bottom of the source sheet, delete the totals row, and re-upload.

Half the tiles are unlabelled and it looks broken

It is not broken: PlotSet is hiding labels that would overlap or overflow a small tile. Check the hover tooltip to confirm the value is still there, and if you need more tiles labelled, group the smallest ones into an "Other" tile so the remaining ones have more room.

En savoir plus sur le Treemap

Vous n'êtes pas sûr que le Treemap soit le bon choix ? Découvrez ce que c'est, quand l'utiliser et quand l'éviter.

À propos du Treemap

Treemap : questions fréquentes

Three columns: category, parent, and value, with one row per tile. Leave the parent blank for top-level tiles, or drop the column entirely for a flat treemap with no hierarchy. CSV and .xlsx both work.

Créez votre Treemap maintenant

Gratuit pour commencer avec plus de 300 modèles. Aucune carte bancaire requise.