How to Add a Chart to a WordPress Page

A WordPress chart sounds like a quick job until you open the block editor and find no chart block. The usual workaround is a screenshot from a spreadsheet, which is hard to read on a phone and out of date after the next edit.

The right route depends on the chart type and on how often the numbers change. These are the 3 we recommend:

  • an image for a number that is final
  • a Google Sheets embed for a pie chart
  • a chart block for a comparison or trend you will update

Core Tables is the WordPress table plugin we built, and its Core Chart block covers that last case. It draws bar and line charts from a saved dataset and prints the data table underneath.

Ways to Add a Chart in WordPress

RouteChart typesWhen the data changesSuits
ImageAnyYou export and upload it againNumbers that won’t change
Google Sheets embedPie, bar, line and moreIt can republish automaticallyPie charts and public data
Core Chart blockBar and line, up to 6 seriesYou publish the dataset and each placement uses itComparisons and trends you maintain

An image is perfectly good for a one-time result. It needs alt text that states the finding, and the numbers should also appear as text near it.

Pick the Chart Type

The question behind the chart decides its type:

  • Which is larger? A bar chart.
  • How did it change over time? A line chart.
  • What share of one total is each part? A pie chart, if there are only a few parts.
  • What is the exact value? A table, with no chart at all.

For example, suppose you run 4 workshops with these bookings:

WorkshopSeatsBookedShare of all bookings
Intro to Spreadsheets201830%
Reporting Basics242135%
Dashboard Design16915%
Data Cleanup201220%

A grouped bar chart of Seats and Booked shows which workshop has room left. A pie chart of Booked shows where the 60 bookings came from, and it can’t show empty seats at all.

Add a Bar or Line Chart in WordPress

In Core Tables, each row is one point and each number column is one series. The chart doesn’t add rows together, so monthly totals need to be totaled before you import them.

  1. Create a dataset and import the CSV file.
  2. On the Columns tab, set Seats and Booked to Number and keep them public. Turn off Public for Internal note.
  3. Save the draft, then publish the dataset.
  4. In your post, insert a Core Chart block and choose the dataset.
  5. Under Chart data, set Chart type to Bar and pick Workshop as the category column.
  6. Select Seats and Booked as the series and type a value axis label, such as Seats.

For a trend, the same steps work with Line and a date or month column as the category. A year column should have the Text type, otherwise the block offers it as a series too.

Published Core Tables line chart comparing WordPress, sites with no detectable CMS, Shopify and Wix by year, with a legend, 4 line patterns and the value for one point on display.

These details change how readers see the result:

  • Bar charts are horizontal and always include zero.
  • Line charts scale from the lowest value to the highest, so a small change can look steep.
  • Several series appear as grouped bars or separate lines.
  • An empty cell leaves a gap in a line.

Add a Pie Chart in WordPress

Google Sheets is the simple route for a pie chart, and it pairs well with a Core Table of the same numbers:

  1. Import the sample into a new Google Sheet and delete the Internal note column.
  2. Select the Workshop and Booked columns, insert a chart and set its type to Pie.
  3. Open File, then Share, then Publish to web, and choose the chart.
  4. Select Embed, publish it and copy the code into a Custom HTML block.

Google warns that published charts show the data used to create them, so a sheet with private figures is the wrong source for an embed.

Make the Chart Readable

A chart can be correct and still fail the person reading it. We would check these before publishing:

  • The finding in words. One sentence above the chart says what it shows.
  • The unit. Seats, dollars and percentages need a label.
  • The exact values. A table helps screen reader users and anyone who wants the number. Core Chart prints one under every chart.
  • More than color. Labels or line patterns keep series apart for color-blind readers.
  • A phone screen. Long category names and more than a few series get crowded first.

Every public column in a Core Tables dataset appears in the table under the chart, including columns you didn’t plot. It is wise to check the Public switches before you publish, and our guide to private table columns lists the places to test.

FAQs on WordPress Charts

WordPress core has a Table block and no chart block. A chart needs an image, an embed or a plugin.

Where to Start

If the number will never change, we would use an image and spend the time on the sentence above it. If you’ll update it even twice, a dataset saves you the second export, and it can refresh from Google Sheets.

For a comparison with several lines, the multi-series chart guide covers the remaining settings.

Tell Google you want more of this.

Add Gatilab as a preferred source

One tap, and this site shows up more often in your own Top Stories, AI Overviews and AI Mode. Remove it any time.