Help:Google bar format

Jump to: navigation, search
Google bar format
Produces a bar chart using the Google Charts API
Available languages
Further Information
Provided by: Semantic Result Formats
Added: 1.4.0
Removed: still supported
Requirements: none
Format name: googlebar
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

↓ INFO ↓

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


Parameter Type Default Description
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 bar 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[] = 'googlebar';
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 bar format en 1.4.0