Insert a Pie Chart in a WordPress Post or Page with a Shortcode

How to insert a Pie Chart into a WordPress post or page? Well, you can use iLecture’s gCharts Plugin.

In the example shown below, the Pie Chart (actually a Google Chart) was generated from a simple WordPress Shortcode:

Customizing colors

You just need to insert an additional column, 'Color':

There are three different ways to choose the colors:

  • RGB values'#b87333'
  • English color names: 'silver'
  • CSS-like declaration: 'color: #e5e4e2'

Donuts are also on the menu

You can switch from a Pie Chart to a Donut Chart by setting the type attribute to "donut":

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.