{"id":1014,"date":"2026-10-23T17:28:58","date_gmt":"2026-10-23T17:28:58","guid":{"rendered":"http:\/\/jfdi-blog-embed-responsive-chart-website"},"modified":"2026-10-23T17:28:58","modified_gmt":"2026-10-23T17:28:58","slug":"embed-responsive-chart-website","status":"publish","type":"post","link":"https:\/\/jfdi.pro\/blog\/embed-responsive-chart-website\/","title":{"rendered":"How to embed a responsive chart on your website"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To embed a chart that resizes on phones, make it in the <a href=\"https:\/\/jfdi.pro\/blog\/charts\/\">JFDI chart maker<\/a>, go to the <strong>Export<\/strong> step, and copy the <strong>Interactive<\/strong> embed code. Paste it into an HTML block on your page. The chart redraws to fit the width it&#8217;s given, keeps its tooltips, and needs no account or hosting on our side.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/jfdi.pro\/charts\/\">Make a chart to embed<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Interactive or static?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Export step offers two kinds of embed:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th>Interactive<\/th><th>Static SVG<\/th><\/tr><\/thead><tbody><tr><td>Resizes to fit phones<\/td><td>Redraws for the width, so text stays readable<\/td><td>Shrinks like an image<\/td><\/tr><tr><td>Tooltips, filters, sliders, animation<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Scripts<\/td><td>Yes: loads the free d3 library from cdnjs (Cloudflare)<\/td><td>None<\/td><\/tr><tr><td>Works where scripts are blocked<\/td><td>No<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Choose <strong>Interactive<\/strong> for most websites. Choose <strong>Static SVG<\/strong> for email newsletters, platforms that strip scripts, or pages where you don&#8217;t want any third-party request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s also <strong>Download as web page<\/strong>, which saves the chart as a standalone HTML file you can upload anywhere or send to someone.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where to paste it<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">WordPress<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the block editor, add a <strong>Custom HTML<\/strong> block (type <code>\/html<\/code>) and paste the code. Use the block&#8217;s <strong>Preview<\/strong> tab to check it. Some hosted WordPress plans and some security plugins remove scripts from posts; if the chart doesn&#8217;t appear, use the Static SVG embed instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Squarespace<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add a <strong>Code<\/strong> block, paste the code, and make sure the display mode is set to HTML.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Wix<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add an <strong>Embed HTML<\/strong> element (the menu names vary between Wix editors), choose <strong>Code<\/strong>, and paste. Wix shows embeds inside a frame, so drag the frame to the height you want.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Plain HTML<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Paste the code where the chart should appear. It takes the width of its container, so put it inside your normal article column.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why responsive matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A chart designed at 960 pixels wide and simply shrunk to a 375-pixel phone screen has its text cut to about 40% of its size, which is unreadable. The interactive embed redraws the chart at the phone&#8217;s width instead, so the text stays at a readable size. It redraws again if the window is resized.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Accessibility<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add a description for screen readers under <strong>Format \u203a Accessibility<\/strong>. <strong>Suggest a description<\/strong> writes a first draft from the title and the data (for example the highest value and the overall trend), and the description is built into both kinds of embed. Write it to say what the chart shows, not what kind of chart it is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Privacy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Your data is built into the embed code itself. Nothing is stored on our servers, so there&#8217;s no account to keep paying for and no chart that disappears if a service shuts down. The trade-off is that anyone who views the page source can see the data, so don&#8217;t embed anything you wouldn&#8217;t publish.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The interactive embed loads the d3 drawing library from cdnjs, a public library host run by Cloudflare, which means visitors&#8217; browsers make one request to it. If that matters for your site, use the Static SVG embed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Maps too<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/jfdi.pro\/map\/\">map maker<\/a> has embed code of its own. Map embeds are completely self-contained: everything, including the boundaries, is in the code, and nothing loads from anywhere else.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Will the chart update if I change my data?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The embed holds a copy of the data from when you made it. To update it, change the chart and paste the new code over the old one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is there a size limit?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The chart maker shows the size of the code next to the copy buttons. Charts with a few thousand data points are fine; very large datasets make long code, and some editors are slow with that.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use it commercially?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, with no watermark and no credit required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/jfdi.pro\/blog\/which-chart-should-i-use\/\">Which chart should I use?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/jfdi.pro\/blog\/how-to-make-a-sankey-diagram\/\">How to make a Sankey diagram<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/jfdi.pro\/help-charts.html\">The chart maker guide: embedding<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Paste one block of code into your page and the chart resizes to fit phones and desktops, with tooltips. Here&#8217;s how to do it in WordPress, Squarespace, Wix and plain HTML, and which embed type to pick.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[28,29,31,30],"class_list":["post-1014","post","type-post","status-publish","format-standard","hentry","category-charts","tag-embed","tag-responsive-charts","tag-web","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/comments?post=1014"}],"version-history":[{"count":1,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions"}],"predecessor-version":[{"id":1045,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions\/1045"}],"wp:attachment":[{"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/media?parent=1014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/categories?post=1014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jfdi.pro\/blog\/wp-json\/wp\/v2\/tags?post=1014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}