Graphina Documentation

How to Fetch Dynamic Data from Google Sheets for WordPress Charts

Introduction

Google Sheets offers various charting options, but if you want to integrate dynamic charts into WordPress, this guide will show you how to do it using Google Sheets as a data source.

We’ve previously discussed dynamic data and common data sources. Now, let’s convert a static chart into a fully dynamic one using Google Sheets.

🔹 Note: Ensure that the allow_url_fopen directive is enabled in your php.ini file for seamless integration.


How to Use Google Sheets for Dynamic Charts

Step 1 – Select a Chart

  • Open Graphina – WordPress Chart Plugin.
  • Choose the chart type where you want to display data from Google Sheets.

Step 2 – Change Data Source to Dynamic

  • In the chart data settings, switch the option from “Manual” to “Dynamic”.
  • At this stage, a “No Data Available” message might appear—this is normal because the data source hasn’t been connected yet.

Step 3 – Connect Google Sheets

  • In the Dynamic Data Options, choose “Google Sheet” as the data type.
  • A URL input box will appear.

Step 4 – Get the Google Sheets URL

  • Open your Google Sheet and go to File > Share.
  • Click on “Publish to Web” and change the format to CSV.
  • Copy the generated CSV link.
  • Paste this link into the Google Sheet URL box in Graphina.

💡 Instant Update: The chart will automatically update as soon as you paste the link!

Step 5 – Adjust Data Elements

  • In the chart data settings, increase the number of data elements if needed.
  • You will now see the chart updating with live Google Sheets data.

Key Features & Notes

Column-Wise CSV Support – Fetch data arranged in columns effortlessly.
Automatic Updates – Any changes made in Google Sheets instantly reflect in WordPress charts.
No Manual Data Entry – Pull data directly from a live Google Sheet without re-uploading files.

With these simple steps, you can seamlessly integrate Google Sheets as a dynamic data source for WordPress charts, eliminating the hassle of manual updates! 🚀