How To Add Charts And Graphs To WordPress
You’ve heard the saying “a picture is worth a thousand words.” This is certainly true when you’re trying to present and explain data.
Using charts and graphs can help to break up technical and difficult information, and make statistical data and information simpler and easier to understand.
You can present information using tables, but if you want your audience to try and interpret complex information with numbers, percentages and relationships quickly, then graphs and charts are perfect for helping them visualize the data.
Charts and graphs help present complex data so people can more easily understand it!
If you want to present dynamic visual content on your WordPress site like charts and graphs, this step-by-step tutorial will show you exactly how to create colourful and updateable charts to your WP pages and posts that:
- Your web visitors can engage with
- Lets you add data from your hard drive or a web-based source of data
- Dynamically resizes for mobile browsers
If you plan to display visual data like bar charts, comparison bars or trending graphs containing static information (e.g. historical data), an easier option is to create your charts or graphs using an image editing application, convert these into images and then simply insert your files and an image into your pages or posts.
Use WordPress Chart & Graph Plugins
If you want to create interactive bar charts and graphs in WordPress with no coding skills required, the easiest way to do this is to use a plugin.
Fortunately, there is a great plugin for WordPress users that is simple to install, easy-to-use and allows you to not only create great-looking and dynamic charts and graphs, it also lets you populate your charts and graphs with dynamic data.
Visualizer
Visualizer URL
You can install the plugin inside your WordPress dashboard (see a little further down the page), or download the WP Visualizer plugin here:
http://wordpress.org/plugins/visualizer
Plugin Description
The WP Visualizer plugin is a simple, easy to use and powerful tool that allows you to create, manage and embed interactive charts into your WordPress posts and pages in 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 extra addons are required.
Visualizer also contains a variety of built-in optimized for 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 the look and feel of your website. Several options are available for each chart that allow you to 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 web visitors can see your charts and graphs on their mobile device browsers without having to install extra software.
Plugin Installation
From your WP admin area, select Plugins > Add New from the navigation sidebar menu …
In the Add Plugins screen type in “visualizer” into the search field and click enter …
Locate the entry in the search results section and click the “Install Now” button …
Click OK to go ahead …
Activate the plugin …
You can also activate the plugin in the Plugins page …
After your plugin has been activated, click on Library …
You can get to the plugin’s ‘library’ screen by selecting Media > Visualizer Library from your dashboard menu …
This brings up the plugin’s Visualizer Library section …
After installing the plugin, the library contains no charts.
Your next step is to add the charts and graphs to your library that you will want to publish to your posts or pages.
Plugin Configuration
To add a chart or graph to the library, click on Add New …
A page will load on your browser displaying all the kinds of graphs and charts available.
Select the type of graph or chart you would like to create and click on the ‘Next’ button …
The 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:
- Your first row contains your column headings.
- The second row contains the series type (e.g. string, date, etc.)
The screenshot below shows how to format your data as explained above …
If you are not sure how to format your data CSV, simply study the sample supplied with the plugin.
Once you have completed this step, 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 from your computer select ‘From Computer‘ …
Locate and select your file and then click on ‘Open‘ …
The plugin will import your data and display it using the graph/chart type you have previously selected …
Upload CSV File From The Web
To learn 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 the information is correct (if not, click on the ‘Back’ button and reupload a data file containing the correct data), and click ‘Next‘ …
Depending on the chart or graph type you’ve selected, the plugin will display a number of customization options and settings …
The plugin gives you complete control over your information, 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 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 look of your graph or chart, click Create Chart …
Your new chart or graph will be added to the ‘Visualizer Library’ section …
Note that new visual elements are given a unique ID displayed in a shortcode. As you will see in a moment, this allows you to add graphs and charts to your WordPress content easily and quickly …
Graphs and charts added to the Visualizer Library can easily be accessed by type …
After adding a chart or graph to the ‘Visualizer Library’, you can edit its details, clone it, or trash it …
Plugin Usage
After creating a new element and adding it to the Visualizer Library, adding it to pages and posts is quite 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‘ …
Find the chart or graph to be added to your content and click the “insert” icon …
This will add a shortcode into your content …
Once you have finished adding your shortcode, click on Publish to publish (or update) your post or page …
After your post has been updated, click ‘View post’ to see the results …
You will see your chart in the location you specified …
As mentioned previously, Visualizer also displays responsive graphs and charts for mobile devices …
As you can see, the Visualizer plugin allows you to add and customize dynamic charts and graphs in your content. You can change your data and the changes will automatically be reflected wherever you have inserted your charts, graphs, comparison bars , etc. in your site. This makes adding dynamic chart data in WordPress very efficient.
The plugin developers have created a number of tutorials you can refer to for ways to edit, customize and use Visualizer.
For tutorials on editing, copying, deleting and adding data to your charts, visit the website below:
Congratulations! Now you know how to add attractive and mobile-responsive pie charts and graphs to WordPress with WordPress Visualizer.
***
"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
***