PlotSet LogoPlotSet

How to Create an Interactive SVG

A step by step walkthrough for turning an SVG drawing into a clickable diagram with popups or a text panel in PlotSet.

About 10 minutes

You will end up with a drawing whose parts open an explanation when a reader clicks or hovers over them.

Expect about ten minutes. Most of it goes on checking that each id in your data matches an element in the drawing.

The data you need

One row per clickable part, with the id of an element in the SVG and the text to show for it.

Sample CSV
idheadingsubheadingcontentlink
steam-wandSteam wandFroths milkAngle the tip just below the surface.
porta-filterPortafilterHolds the coffeeLock it in a quarter turn.
drip-trayDrip trayCatches spillsEmpty it every day.
power-buttonPowerSwitches the machine onWait two minutes to warm up.
Notes

The id must match the id, class, name or aria-label of an element in the SVG, ignoring case.

Only the id is required. The heading falls back to the id if left blank.

A category column can recolour the matched parts and build a legend.

A reveal column names an element that stays hidden until its row is selected.

The steps

The exact click path in PlotSet, from a blank template to a finished chart.

  1. 01

    Open the Interactive SVG template

    From the PlotSet dashboard, start a new project and choose Interactive SVG from the Other category. It loads with an espresso machine and five numbered parts.

    PlotSet's template picker: chart categories listed down the left, the Bar Charts grid open, and the Bar Chart template card showing its Select button.
    Every guide starts here. Pick the category, then the template: it is the same grid whichever chart type you are after.
  2. 02

    Add your drawing

    Open the SVG tab and give a URL or paste your SVG markup. Choose how the drawing fits, sizes and aligns inside the chart.

  3. 03

    Add your data

    Import a CSV or .xlsx file, paste rows from a spreadsheet, or connect a Google Sheet. Each row is one part of the drawing.

    The PlotSet editor's data view: a spreadsheet grid with Name, Value and Region columns filled with Canadian province figures, beside the Data panel offering CSV upload, Magic Import and Google Sheet sync.
    The data view, shown here on a bar chart project. Upload a CSV, lift the numbers out of an image with Magic Import, or sync a Google Sheet. The panel is identical for every chart type.
  4. 04

    Bind the columns

    Choose the id column, then the heading, subheading and content columns. Add a category or a link column if you have them.

    The PlotSet data panel with the column bindings highlighted: Label/time mapped to column A, Values to column B and Filter/color to column C, with the Auto Binding button below.
    Bindings decide which column becomes the label, which supplies the values and which drives the colour. Auto Binding guesses them from your headers, so check it rather than assume it.
  5. 05

    Choose click or hover

    In the Interaction tab, pick the trigger, how unselected parts fade, and whether a click follows the row's link.

    The PlotSet editor on the Preview tab: a finished Interactive SVG on the canvas, with the settings panel outlined in red down the right-hand side.
    The Preview tab for a Interactive SVG. Every styling control lives in the outlined panel, each on its own tab: appearance, header, footer and the options specific to this chart type.
  6. 06

    Pick a popup or a panel

    The Popup content and Text panel tabs set where the details appear and how they are styled.

  7. 07

    Check it on a phone

    The Mobile tab sets whether readers see the drawing, the text or both below a set width.

  8. 08

    Publish and embed

    Publish for a live chart and copy the embed code from the Share dialog. Click every part once before you share it.

    The PlotSet editor toolbar with the Share button highlighted, sitting next to the Export button.
    Share is how a finished chart becomes a public link and an embed code.

Start from the Interactive SVG template with sample data already loaded, then swap in your own.

Open the template

Publish, embed or export it

The last stretch is the same for every chart type: Share turns the chart into a live public link and an embed code, Export writes it out as a static file.

Share: public link and embed code

Activating the embed code and public link publishes the chart. The link is safe to send to anyone, and the embed code drops into any page as an iframe that keeps the hover tooltips and the interactivity. Edit the chart later and hit Recreate to push those changes out to both.

The PlotSet editor toolbar with the Share button highlighted, sitting next to the Export button.
Share is how a finished chart becomes a public link and an embed code.
PlotSet's Share dialog: the toggle activating the embed code and public link, buttons for Link, Embed, Facebook, Reddit, Twitter, LinkedIn and Email, and the public chart link with a Copy button.
Switch on the embed code and public link, then copy the link or take the iframe. Recreate pushes later edits out to everyone already holding it.

Export: SVG, PNG or JPG

Export writes a static copy at whatever size you need. SVG stays sharp at any scale and can still be edited in a design tool; PNG and JPG are the safe choices for slides and documents. The scale multiplier is what gets you a crisp image on a retina screen.

The PlotSet editor toolbar with the Export button highlighted.
Export is the route to a static file for a slide or a report.
PlotSet's Export chart dialog: a 2x scale selector, width and height fields set to 1000 by 600, and the open format menu listing SVG, PNG and JPG.
SVG stays sharp at any size and stays editable in a design tool; PNG and JPG are the safe picks for a deck. Set the scale before you export so the image is crisp on a retina screen.

Styling tips for a Interactive SVG

Name your layers

Give each part of the drawing a clear id in your design tool before you export the SVG.

Keep text short

Two or three lines per part read well in a popup and fit the panel.

Number the parts

Markers with numbers show readers where to click and give the text an order.

Dim what is not covered

Fading the parts with no row keeps the eye on what is interactive.

Common mistakes when making a Interactive SVG

A part does not respond

Its id does not match an element in the SVG. Compare the spelling with the layer name.

The drawing does not load

The URL is blocked or missing cross-origin headers. Paste the markup instead.

The panel text is cut off

The panel does not scroll. Shorten the text or switch to popups.

Nothing happens on a phone

Hover does not exist on touch screens. Switch the trigger to click.

Learn more about the Interactive SVG

Not sure the Interactive SVG is the right choice? See what it is, when to use it and when not to.

About the Interactive SVG

Interactive SVG: common questions

Yes. Export it as SVG with the layer names kept as ids, then paste the markup or link to it.

Make your Interactive SVG now

Free to start with 300+ templates. No credit card required.