How To Add Charts And Graphs To WordPress
You’ve no doubt heard the old adage “a picture is worth a thousand words.” This certainly applies when you’re trying to present or explain complex information.
Using charts and graphs can help to break up long text passages, and make technical data much simpler to grasp.
You can present data with tables, but if you want people to try and interpret complex information with figures, trends and relationships easily, then charts and graphs let you present your data in a meaningful and intelligent manner that can be easily processed.
Graphs and charts help you explain complex information so your audience can more easily interpret it!
If you need to present dynamic visual content on your WordPress site using charts and graphs, this tutorial will show you how to create colorful and interactive graphs and charts to your WP posts that:
- Your visitors can interact with
- Allows you to add data from your computer or an online data source
- Resizes dynamically for mobile devices
If you plan to display visual data like pie charts, comparison bars or trending graphs that contain static information (e.g. historical data), a simple method you can use is to create the charts or graphs using a desktop application, convert these into .jpg or .png images and then simply insert the image into your web content.
Use WordPress Chart & Graph Plugins
If you want to easily embed dynamic bar charts and pie charts into 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 great-looking and mobile-responsive graphs and charts, it also lets you populate your charts and graphs with updatable information.
Visualizer Plugin For WordPress
Plugin URL
You can install the plugin from your WP dashboard (see further down the page), or download Visualizer here:
http://wordpress.org/plugins/visualizer
Plugin Description
WP Visualizer is a simple, easy to use and powerful tool that lets you create, manage and insert interactive charts and graphs into your WordPress posts and pages in 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 extra plugins are required.
Visualizer also contains a variety of charts 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 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 further customize their settings.
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 browsers without requiring the installation of extra plugins.
How To Install WordPress Visualizer
From your WP administration area, select Plugins > Add New from the navigation sidebar menu …
In the Add Plugins screen type in “visualizer” into the search field and hit enter …
Locate the plugin 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 area …
After the 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 page …
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 plan to publish to your posts or pages.
Visualizer Configuration
To add a graph or chart to the library, click on the Add New button …
A visual gallery displaying all of the built-in kinds of charts and 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 graph/chart type will open up in a lightbox.
The next step is to upload a CSV file with 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 includes the column headings.
- The 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 unsure about how to format your CSV file, just refer to the sample file supplied with the plugin.
Next, select the data source (‘From Computer’ or ‘From Web’) in the ‘Upload CSV File’ section.
Upload CSV File From Computer
To upload your CSV file from your computer select ‘From Computer‘ …
Locate and select your file and then click on ‘Open‘ …
The plugin imports your data and displays it using the graph/chart type chosen …
Upload CSV File From The Web
For a step-by-step tutorial that shows you how to create, save and publish data to a Visualizer chart or graph using Google Spreadsheet, see the article below:
After importing your data, make sure that all of your information is correct (if not, click on the ‘Back’ button and reupload a data file with the correct data), and click ‘Next‘ …
Depending on the chart or graph type selected, the plugin will display various customization settings and options …
The plugin gives you full control of your information, and updates your display in real time …
For example, the pie chart offers various 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 Create Chart …
The graph or chart will be added to your ‘Visualizer Library’ section …
Note that new elements are given a unique ID displayed as a shortcode. As you will see in a moment, this lets you add graphs and charts to your content very quickly …
Charts and graphs added to the Visualizer Library can easily be accessed by type …
After adding a graph or chart to the ‘Visualizer Library’, you can edit its details, clone it, or trash it …
Visualizer Plugin Usage
After creating a new element and adding it to the Visualizer Library, it’s very simple to insert it into a page.
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 the ‘Add Media‘ button …
Click on ‘Visualizations‘ …
Select the chart or graph you want to add to 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 page or post …
Once the page/post has been updated, click ‘View post’ to see the end result …
You will see the element in where you placed the shortcode …
As mentioned previously, the plugin also displays responsive graphs and charts for mobile devices …
As you can see, WordPress Visualizer lets you insert and customize dynamic charts and graphs in your content. You can update your data and your changes will automatically be reflected throughout your site. This is one of the great benefits of using the Visualizer plugin if you’re adding interactive chart data 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, go to the website below:
Congratulations! Now you know how to easily add beautiful and interactive charts and graphs to WordPress.
***
"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)
***