| id | heading | subheading | content | link |
|---|---|---|---|---|
| steam-wand | Steam wand | Froths milk | Angle the tip just below the surface. | |
| porta-filter | Portafilter | Holds the coffee | Lock it in a quarter turn. | |
| drip-tray | Drip tray | Catches spills | Empty it every day. | |
| power-button | Power | Switches the machine on | Wait two minutes to warm up. |
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.
约 10 分钟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.
你需要的数据
One row per clickable part, with the id of an element in the SVG and the text to show for it.
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.
操作步骤
PlotSet 中从空白模板到完成图表的具体点击路径。
- 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.

每份指南都从这里开始:先选分类,再选模板,不管你要做哪种图表,用的都是同一个网格。 - 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.
- 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.

这里的数据视图取自一个条形图项目。你可以上传 CSV、用「Magic Import」从图片里提取数字,或同步 Google Sheet,每种图表类型的面板都一样。 - 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.

绑定决定哪一列作标签、哪一列提供数值、哪一列决定颜色。「Auto Binding」(自动绑定)会根据表头推测,所以要核对一遍,别想当然。 - 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.

Interactive SVG 的「Preview」标签页。所有样式设置都在红框标出的这个面板里,每个设置各自占一个标签页:外观、标题、脚注,以及这种图表类型特有的选项。 - 06
Pick a popup or a panel
The Popup content and Text panel tabs set where the details appear and how they are styled.
- 07
Check it on a phone
The Mobile tab sets whether readers see the drawing, the text or both below a set width.
- 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.

点「Share」,完成的图表就会变成一个公开链接和一段嵌入代码。
从已加载示例数据的 Interactive SVG 模板开始,再替换成你自己的数据。
打开模板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.
制作 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.
深入了解 Interactive SVG
不确定 Interactive SVG 是否是正确选择?查看它是什么、何时使用以及何时不使用。
Interactive SVG:常见问题
Yes. Export it as SVG with the layer names kept as ids, then paste the markup or link to it.
现在制作你的 Interactive SVG
免费开始,300+ 模板任选。无需信用卡。


