Help:Google pie format
| 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:info.pngIndicates whether the result format is enabled by default upon installation of the respective extension. | no |
| 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.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| height | Whole number | 100 | The height of the chart, in pixels |
| width | Whole number | 250 | The width of the chart, in pixels |
Example
{{#ask:
[[Category:City]] [[located in::Germany]]
|?population
|format=googlepie
}}
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.
Usage
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.
Enabling
This result format is not enabled by default on a wiki. To enable it the linemust be added to the file LocalSettings.php below the inclusion of the Semantic Result Formats extension.$srfgFormats[] = 'googlepie';
Chart formats
- Google bar format
- Google pie format
- Jqplotbar format
- Jqplotpie format