How To Add Charts And Graphs To WordPress
You’re probably familiar with the saying “a picture is worth a thousand words.” This certainly applies when you are trying to present or explain complex data.
Using charts and graphs is useful for making technical or statistical data more easily digestible.
You can use tables to present information, but if you want people to try and interpret complex information with figures, trends and relationships quickly, then graphs and charts are perfect for helping them visualize the information.
Charts and graphs help you explain complex data so people can more easily interpret it!
If you need to learn how to present dynamic visual content on your WordPress site using charts and graphs, this step-by-step tutorial will show you exactly how to create eye-catching and updatable charts to your WP posts that:
- Your visitors can engage with
- Allows you to add chart or graph data from your computer or an online source of data
- Is fully responsive for mobile screens
If you plan to display visual data like pie charts, comparison graphs or trending graphs that contain static information (e.g. historical data), an easier option is to create your graphs or charts using an image editing application, convert these into .jpg and .png images and then simply add the image files to your page or post.
Use WordPress Chart & Graph Plugins
If you want to add interactive bars and pie charts to WordPress with no coding skills required, the easiest way to do this is to use a plugin.
Fortunately, there is a great free WordPress plugin that is simple to install, easy-to-use and allows you to not only create attractive and mobile-responsive graphs and charts, it also lets you populate your charts and graphs with updatable data.
Visualizer – WP Plugin
Visualizer Plugin URL
You can install the plugin in your WP dashboard (explained a little further down the page), or access and download Visualizer from the link below:
http://wordpress.org/plugins/visualizer
Visualizer Description
WordPress Visualizer is a simple, easy to use and powerful WordPress plugin that lets you create, manage and insert appealing and mobile-responsive charts into your WordPress posts and pages in just a few mouse clicks.
WordPress 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 add-ons are required.
WordPress Visualizer also contains a variety of built-in that are optimized to address 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 a flexible and customizable plugin, allowing you to use Google Chart Tools with their default setting, or configure an extensive set of options to match the look and feel of your website. 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 device browsers without requiring the installation of additional software.
How To Install The Plugin
From 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 the item in the search results area and click Install Now …
Click OK to proceed …
Activate the plugin …
You can also activate the plugin in the Plugins section …
Once your plugin has been activated, click on Library …
You can also get to the plugin’s ‘library’ screen by choosing Media > Visualizer Library in your main menu …
This takes you to the plugin’s Visualizer Library settings …
When you first install the plugin, the library section will be empty.
Your next step is to add the charts and graphs to your library that you will want to publish to your content.
Visualizer Plugin Configuration
To add a new chart or graph to the library, click on the ‘Add New’ button …
A page will appear on your screen displaying all of the default kinds of charts and graphs available.
Select the graph or chart type you would like to create and click on the ‘Next’ button …
The graph/chart type will pop up in a lightbox.
The next step is to upload a CSV file with the data you would like your chart or graph to be populated with …
When creating your CSV data file, ensure that:
- The first row contains the column headings.
- Your second row contains the series type (e.g. string, timeofday, etc.)
The screenshot below shows how to format your data as explained above …
If you are unsure about how to format your data CSV, just refer to the sample spreadsheet that comes 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 the CSV file and data from your hard drive select ‘From Computer‘ …
Locate and select your file and click on ‘Open‘ …
The plugin will now import your data and display it using the graph/chart type chosen …
Upload CSV File From The Web
For a tutorial that shows you how to create, save and publish data to a Visualizer chart or graph using Google Spreadsheet, go here:
After importing your data, check that all of your information is correct (if not, click on the ‘Back’ button and reupload a data file containing the right data), and click ‘Next‘ …
Depending on the chart or graph type selected, the plugin will display a number of customization settings …
Visualizer gives you full 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 chart title settings, 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 the 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 the way your graph or chart is looking, click Create Chart …
The new chart or graph will be added to the Visualizer ‘Library’ …
Note that each new element is given a unique ID displayed as a shortcode. As you will see very soon, this allows you to embed graphs and charts into your WordPress pages easily and quickly …
Graphs and charts added to the Visualizer Library can easily be accessed by their type …
After a chart or graph has been added to the ‘Visualizer Library’, you can edit its details, duplicate it, or delete it …
Visualizer Usage
After creating a new chart or graph and adding it to Visualizer, adding it to pages or posts is very simple.
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 your content and click on Add Media …
Click on ‘Visualizations‘ …
Select the chart or graph you want to add to your content and click the “insert” icon …
This inserts a shortcode into your content …
After you have finished adding your visual element, click on Publish to publish (or update) your page or post …
Once your post/page has been updated, click ‘View post’ to see the result …
You will see the item in the location you specified …
As mentioned earlier, the plugin also displays responsive charts and graphs for viewing on mobile devices …
As you can see, Visualizer lets you add and customize dynamic charts and graphs in your content. You can edit your data and the changes will automatically be reflected wherever you have inserted your charts, graphs, comparison bars , etc. in your site. This makes working with dynamic chart data in WordPress very efficient.
The developers of this plugin have created a series of tutorials you can refer to for ways to edit, customize and use the Visualizer plugin.
For additional tutorials on editing, cloning, deleting and adding data to your charts, refer to the site below:
Congratulations! Now you know how to create great-looking and interactive bar charts and graphs in 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
***