How To Add Charts And Graphs To WordPress
You’ve no doubt heard the adage “a picture is worth a thousand words.” This certainly applies when you are trying to present or explain complex data.
Using graphs and charts is useful for breaking up long passage of technical information, and making statistical data and information more easily digestible.
You can use tables to present data, but if you want people to try and make sense of complex information with numbers, trends or relationships more easily, then graphs and charts allow you to present the data in an intelligent and meaningful way that can be easily understood.
Charts and graphs help explain complex information so people can more easily understand it!
If you want to display information visually and dynamically on your WordPress site using charts and graphs, this step-by-step tutorial will show you how to create attractive and interactive graphs and charts to your WP pages that:
- Your web visitors can interact with
- Allows you to add chart or graph data from your computer or a web-based data source
- Is fully responsive for mobile browsers
If you are displaying visual data like bar charts, comparison data or trending graphs containing static information (e.g. historical data), an easier way to display the data is to create your charts or graphs using an image editing application, convert these into .jpg and .png images and then simply add your image files to your content.
Use WordPress Chart & Graph Plugins
If you want to create interactive bars and pie charts in WordPress with no coding skills required, the easiest way to do this is to use a plugin.
Fortunately, there is a free plugin for WordPress that is simple to install, easy-to-use and allows you to not only create colorful and dynamic graphs and charts, it also lets you populate your charts and graphs with updateable information.
Visualizer
Plugin URL
You can install the plugin in your WP dashboard (we will show you how to do this further below), or download Visualizer the WordPress plugin repository using the link below:
http://wordpress.org/plugins/visualizer
Visualizer Plugin Description
Visualizer is a simple, easy to use and powerful WordPress plugin that lets you create, manage and embed colorful graphs into your WordPress posts and pages in a few simple steps.
The plugin 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 components are required.
WordPress Visualizer also provides a variety of built-in 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
The plugin is also flexible and customizable, allowing you to use Google Chart Tools with their default setting, or configure an extensive set of options to match your site’s design. A number of options are available for each chart that let you fully customize their look and feel.
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 site visitors can see your charts and graphs on their mobile device browsers without having to install extra plugins.
Plugin Installation
Inside your WP dashboard, select Plugins > Add New from the main admin menu …
In the Add Plugins page type search for “visualizer” and hit enter …
Locate Visualizer in the search results section and click the “Install Now” button …
Click OK to proceed …
Activate the plugin after successfully installing it …
You can also activate the plugin in the Plugins area …
Once your plugin has been activated, click on Library …
You can also get to the plugin’s ‘library’ screen by choosing Media > Visualizer Library from the admin menu …
This brings up the plugin’s Visualizer Library options page …
After installing the plugin, this section will be empty.
The next step is to add the charts and graphs to your library that you plan to insert into your content.
How To Configure The Plugin
To add a chart or graph to the Visualizer library, click on the ‘Add New’ button …
A gallery displaying all of the built-in kinds of graphs available will come up on your screen.
Select the type of chart or graph you would like to create and click on the ‘Next’ button …
Your selected graph/chart type will open up in a lightbox.
The next step is to upload a CSV file that contains all the data you would like to populate your chart or graph with …
When creating your CSV data file, make sure that:
- The first row includes the column headings.
- The second row contains the series type (e.g. boolean, date, etc.)
The screenshot below shows how to format your data correctly …
If you are not sure how to format your CSV file, simply study the sample supplied with the plugin.
Once you have done this, 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 computer 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 you have selected …
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, go here:
After importing the data, check that all of your information is correct (if not, click on the ‘Back’ button and reupload a data file with the right data), and then click ‘Next‘ …
Depending on the chart or graph type you’ve selected, the plugin will display various customization settings …
Visualizer gives you complete control over 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’re happy with how your chart or graph is looking, click on the ‘Create Chart’ button …
Your chart or graph will be added to your ‘Visualizer Library’ section …
Note that every new element is given a unique ID displayed in a shortcode. As you will see in just a moment, this allows you to easily embed graphs and charts into your content …
Graphs and charts added to the Visualizer Library can easily be accessed by their type …
After an item has been added to the ‘Visualizer Library’, you can edit it, clone it, or trash it …
Plugin Usage
Once you’ve created a graph or chart and added it to Visualizer, it’s simple to add it to your posts or pages.
First, create a new post or page (or open an existing one) …
Next, place your mouse cursor where you want to insert your visual element into the content and click on Add Media …
Click on ‘Visualizations‘ …
Select the chart or graph to be added to your content and click the “insert” icon …
This will place a shortcode into your content …
After you have added the visual element, click on Publish to publish (or update) your page or post …
After your page/post has been updated, click ‘View post’ to see it …
Your graph will display in your content …
As mentioned earlier, Visualizer also displays responsive charts and graphs for mobile devices …
As you can see, WordPress Visualizer allows you to add and customize dynamic charts and graphs in your content. You can update your data and the changes will automatically be reflected throughout your site. This is great if you’re working with interactive chart information in WordPress.
The plugin developers have created a number of tutorials you can use to learn how to edit, customize and use the plugin.
For tutorials on editing, copying, deleting and adding data to your charts, refer to the website below:
Congratulations! Now you know how to add great-looking and interactive bar charts and graphs to WordPress.
***
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum
***