Skip to content

Adding amCharts to Squarespace

This tutorial will show how we can easily add an amCharts 5 chart to a Squarespace page.

This tutorial assumes you have a basic understanding of how amCharts 5 works and how to create a code for it.

It also utilizes premium feature of Squarespace - JavaScript embedding - which means you will need a paid plan.

Let’s add a new section and click ADD BLOCK.

Select an “Code” block.

Squarespace block menu with the Code block highlighted

Squarespace will add a generic “Hello world” HTML block, which we will need to overwrite with amCharts code.

Squarespace page editor with a new Code block showing Hello, World

Double-click on it to start editing.

It’s an HTML, so we will add everything needed to display amCharts there:

  • CSS
  • amCharts JavaScript libraries
  • amCharts JavaScript code

As a matter of test, let’s just grab a ready-made code from this amCharts demo and paste it into Squarespace editor.

Squarespace Code block editor with amCharts HTML, CSS and scripts pasted in

Now, let’s just size up the block and click SAVE button to save the page.

Squarespace page editor with the Code block resized to full width

That’s it! We can go and preview the page.

Published Squarespace page showing a stacked clustered column chart