Back to blog
embed-guide

How do I embed an interactive chart in WordPress?

17 June 2026 5 min read

Quick answer

The most reliable way to embed an interactive chart in WordPress is to add a Custom HTML block in the block editor and paste your chart's iframe-and-script embed code (use the Text tab in the Classic editor). Some providers also support oEmbed - pasting the chart URL alone - but only if WordPress does not strip the responsive script. Note that lower WordPress.com tiers and some security plugins remove iframe and script tags; self-hosted WordPress.org has no such limit.

Paste the chart's embed code into a Custom HTML block. In the WordPress block editor, add a block, choose Custom HTML, drop in the iframe-and-script snippet your charting tool gives you, and hit Preview. That one move covers almost every interactive chart. The wrinkles are about responsiveness, security, and which WordPress you are on, and they are worth getting right.

The three real methods

There are three ways to get an interactive chart onto a WordPress page, in rough order of how often you will want them.

First, the Custom HTML block. Nearly every charting tool, Datawrapper, Flourish, Quadesto, or a hand-rolled D3 chart, gives you an embed snippet: an iframe plus a small responsive script. The Custom HTML block pastes it verbatim. On the older Classic editor, do the same from the Text tab, never the Visual tab, which mangles raw markup.

Second, oEmbed. Some providers let you paste just the chart's URL on its own line and WordPress expands it into the live chart. It is the tidiest option when it works, but it depends on the provider supporting oEmbed and on WordPress not stripping the script that makes the chart responsive. Datawrapper ships a dedicated oEmbed plugin precisely because some WordPress setups strip that JavaScript, leaving charts cut off or squashed.

Third, a charting plugin such as Visualizer or wpDataTables. These build the chart inside WordPress from a table or CSV you maintain in the dashboard. They are fine for a simple bar or line chart, but they are general-purpose, and you will fight them the moment you need a yield curve, a volatility surface, or anything finance-specific.

The responsiveness gotcha

A raw iframe with a fixed pixel height will not reflow on a phone. Either use the responsive embed code your provider supplies, the version with the resizing script rather than the bare iframe, or wrap the iframe in a container with a fixed aspect ratio. If a chart looks fine on desktop and clipped on mobile, this is almost always why.

Security and which WordPress you are on

An embedded iframe runs third-party code inside your page, so only embed from sources you trust. This also explains a common failure: many security plugins, and the lower WordPress.com tiers, strip iframe and script tags outright. Self-hosted WordPress.org sites have no such limit; WordPress.com needs a Business plan before it will run plugins or custom embed code. If your pasted snippet simply vanishes on save, a sanitiser is removing it.

Why an embed beats a screenshot, for data

For a static infographic, a screenshot is fine. For finance and live data it is not: a screenshot of a yield curve is stale the moment you take it, and readers cannot hover for the number behind a point. An interactive embed stays current and lets the reader interrogate it. That is the whole reason to bother with the Custom HTML block instead of pasting an image. The same logic applies on every platform, and we have covered the equivalent steps for Webflow and Notion.

[QUADESTO-EMBED: live interactive line chart, responsive iframe, shown sitting inside a WordPress post column]

Doing it with Quadesto

Quadesto gives you a responsive embed snippet built for exactly this: drop it into a Custom HTML block and the chart resizes itself, no wrapper needed. Point it at your data, Treasury yields, a rate-probability ladder, a KPI series, and it builds the view. The free tier embeds with a Made with Quadesto credit; Pro (149 pounds a month) removes the attribution and adds branded themes. If you are publishing finance or business data on WordPress and want it live rather than flat, that is the gap it fills.

Ready to try Quadesto?

Connect your data. AI builds the charts. Embed anywhere.

Get Started Free
WordPressembedinteractive chartGutenberg