Help:Google pie format

Jump to: navigation, search
Google pie format
Produces a pie chart using the Google Charts API
Further Information
Provided by: Semantic Result Formats
Added: 1.4.0
Removed: still supported
Requirements: none
Format name: googlepie
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
Authors: Denny Vrandecic
Categories: charts
Table of Contents

The result format googlepie, part of Semantic Result Formats, is used to produce bar charts using the Google Charts API.


Parameter Type Default Description
height whole number 100 Specify the height (in pixels) of a chart or graph
width whole number 250 Specify the width (in pixels or percent) of a chart or graph


 [[Category:City]] [[located in::Germany]]

Another example can be found here.

Privacy notice

You must not forget that every time a user comes to a page with a Google chart, Google gets a ping. And you also send all your data to Google in order to render it. Don't forget also that these printers do not work offline, if you have a local wiki.


You use the same queries as usual, but make sure to add a printout statement with a property that is of type Number. All printouts of properties of type number will be taken for the visualization. The only further parameters (for now) are height and width (if not given, mostly sensible values are assumed).

You may want a pie chart to not show property values directly, but rather the popularity of different values of a property across the entire wiki; i.e. a numerical distribution. This is fairly easy to do; see here for how.


This result format is not enabled by default on a wiki. To enable it the line
$srfgFormats[] = 'googlepie';
must be added to the file LocalSettings.php below the inclusion of the Semantic Result Formats extension.

Chart formats

These are the chart related result formats provided by SMW and extensions to SMW.

This documentation page applies to all SMW versions from 1.4.0 to the most current version.
      Other languages: zh-hans

Help:Google pie format en 1.4.0