How To Add Charts And Graphs To WordPress
You’ve no doubt heard the old saying “a picture is worth a thousand words.” This certainly applies when you are trying to present or explain data.
Using graphs and charts is a great way to make statistical data simpler to understand.
You can use tables to present data, but if you want people to try and make sense of complex information with figures, trends and comparisons quickly, then graphs and charts are perfect for helping them visualize the information.
Graphs and charts help you present complex data so your audience can more easily interpret it!
If you want to display dynamic visual content on your WordPress site using graphs and charts, this step-by-step tutorial will show you how to create appealing and interactive charts and graphs to your pages that:
- Your visitors can interact with
- Lets you add chart or graph data from your hard drive or an online data source
- Will resize dynamically for mobile device viewing
If you are displaying visual data like bar charts, comparison graphs or trending graphs containing static information (e.g. historical data), a simple method you can use is to create your charts or graphs using an image editing application, convert these into images and then simply add your images to your posts or pages.
Use WordPress Chart & Graph Plugins
If you want to create dynamic bar charts and pie graphs in your WordPress pages and posts with no coding skills required, the easiest way to do this is to use a plugin.
Fortunately, there is a free plugin for WordPress sites that is simple to install, easy-to-use and allows you to not only create great-looking and mobile-responsive charts and graphs, it also lets you populate your charts and graphs with updatable content.
Visualizer
Plugin URL
You can install the plugin in your WP dashboard (we will explain how to do this a little further down the page), or access and download Visualizer here:
http://wordpress.org/plugins/visualizer
Plugin Description
Visualizer is an easy-to-use and powerful plugin that lets you create, manage and embed great-looking graphs and charts into your WordPress posts and pages with a few mouse clicks.
Visualizer uses Google Visualization API to render charts, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases, and are based on pure HTML5/SVG technology (adopting VML for old IE versions), so no additional addons are needed.
Visualizer also contains a variety of charts that are optimized to address all your data visualization needs, including:
- Line chart
- Area chart
- Bar chart
- Column chart
- Pie chart
- Geo chart
- Gauge chart
- Candlestick chart
- Scatter chart
Visualizer is flexible and customizable, allowing you to use Google Chart Tools with their default setting, or configure an extensive set of options to match your web design. Several options are available for each chart that let you further customize their look.
Additionally, charts are rendered using HTML5/SVG technology to provide cross-browser compatibility (including VML for older IE versions) and cross-platform portability to iPhones, iPads and Android devices. Your visitors can see your charts and graphs on their mobile devices without having to install any additional plugins.
How To Install Visualizer
Inside your WP dashboard, select Plugins > Add New from the main menu …
In the Add Plugins page type in “visualizer” into the search field and hit enter …
Locate Visualizer in the search results area and click the “Install Now” button …
Click OK to continue …
Activate the plugin after installation is successful …
You can also activate the plugin in the Plugins section …
Once the plugin has been activated, click on Library …
You can also get to the plugin’s ‘library’ screen by selecting Media > Visualizer Library from your admin menu …
This takes you to the plugin’s Visualizer Library screen …
After installing the plugin, the library contains no charts.
The next step is to add the charts and graphs to your library that you plan to publish to your content.
How To Configure The Visualizer Plugin
To add a chart or graph to the library, click on ‘Add New’ …
A visual gallery displaying all the different types of charts available will load on your screen.
Select the type of chart or graph you would like to create and click on the ‘Next’ button …
Your graph/chart type will open up in a lightbox.
The next step is to upload a CSV file that contains your data …
When creating your CSV data file, make sure that:
- The first row contains the column headings.
- Your second row includes the series type (e.g. string, timeofday, etc.)
The screenshot below shows how to format your data as required …
If you are not sure how to format your CSV file, simply download the sample spreadsheet supplied with the plugin.
Next, select your data source (‘From Computer’ or ‘From Web’) in the ‘Upload CSV File’ section.
Upload CSV File From Computer
To upload a CSV file from your hard drive select ‘From Computer‘ …
Locate and select your data file and then click on ‘Open‘ …
The plugin imports the data from the CSV file and displays it using the graph/chart type chosen …
Upload CSV File From The Web
For a tutorial that explains how to create, save and publish data to a Visualizer chart or graph using Google Spreadsheet, see the article below:
After importing the data, check that all of the information is correct (if not, click on the ‘Back’ button and reupload a data file with the right data), and click ‘Next‘ …
Depending on the chart or graph type selected, the plugin will display a range of customization options …
Visualizer gives you total control of your chart or graph, and updates your display in real time …
For example, the pie chart offers many configurable options, including:
- General Settings – Configure settings for the chart’s title, font styles, tooltip, and legend.
- Pie Settings – Create 3D pie charts, draw slices counterclockwise, set the text content displayed on the slice, create a “donut” pie chart, rotate the chart’s “start” angle and set the slice border color.
- Residue Settings – Set the ‘Visibility Threshold’ (the slice relative part, below which a slice will not show individually.), ‘Residual Slice Label’ (the label for the combination slice that holds all slices below slice visibility threshold, e.g. “Other”), and ‘Residue Slice Color’.
- Slice Settings – Customize the ‘Slice Offset’ (how far to separate a slice from the rest of the pie), and ‘Slice Color’.
- Layout & Chart Area – Configure the layout (total size of chart) including the width and height of the chart as a number of percentage, background color for the main area of the chart and the chart border width and color, and the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends).
Once you are satisfied with the look of your chart or graph, click on the ‘Create Chart’ button …
Your chart or graph will be added to the ‘Visualizer Library’ section …
Note that new visual elements are given a unique ID displayed as a shortcode. As you will see shortly, this allows you to add graphs and charts to your WordPress posts and pages quickly …
Charts and graphs added to the Visualizer Library can easily be accessed by their type …
After a new chart or graph has been added to the ‘Visualizer Library’, you can edit its details, clone it, or delete it …
Plugin Usage
Once you’ve created a new graph or chart and added it to the Visualizer Library, adding it to a page is really simple.
First, create a new post or page (or open an existing one) …
Next, place your mouse cursor where you would like to insert your visual element into the content and click on Add Media …
Click on ‘Visualizations‘ …
Select the chart or graph to be inserted into your content and click on the “insert” icon …
This adds a shortcode for the element into your content …
After you have added the shortcode, click on Publish to publish (or update) your post or page …
After publishing the page/post, click ‘View post’ to see the result …
The graph will appear in where you placed the shortcode …
As mentioned previously, the plugin also displays responsive graphs and charts for mobile browsers …
As you can see, Visualizer lets you insert and customize dynamic charts and graphs in your content. You can modify your data and your changes will automatically be reflected wherever you have inserted your charts, graphs, comparison bars , etc. in your website. This is a real time-saver if you’re managing interactive chart data in WordPress.
The plugin developers have created a series of tutorials you can refer to to learn how to edit, customize and use the Visualizer plugin.
For additional tutorials on editing, copying, deleting and adding data to your charts, visit the site below:
Congratulations! Now you know how to easily insert dynamic bar charts and graphs into your WordPress pages and posts.
***
"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)
***