WebCharter
From fmepedia
WebCharter is a Workbench Transformer.
| Table of contents |
Description
This transformer creates a URL that can be used to obtain a chart of the specified data as a PNG image from the Google Chart API, as documented here (http://code.google.com/apis/chart). Note that Google, and Google Charts API are trademarks of Google, Inc. Use of the Google Charts API is subject to the Terms of Service for the API.
The ImageFetcher transformer can be used to retrieve the chart produced by the URL and convert it into a raster feature for further processing and output. Another potential use of the URL, when writing KML, is to attach dynamic charts to placemarks by including it as part of the kml_description.
Example
The attached workspace shows an example use of the WebCharter transformer.
The workspace reads a set of park data (sampled for clarity) and calculates the area of each park. The features are aggregated together to produce a single feature with a list of attributes. The WebCharter turns the list into a URL suitable for the Google Charts API, which is subsequently sent off by the ImageFetcher. The results are returned as a raster feature which is converted into GeoTIFF.
Workspace Screenshot

Above: WebCharter Example Workspace.
In this example the URL formulated by the WebCharter is:
http://chart.apis.google.com/chart?cht=p3 &chd=e:dbPA..AzRNBUD7BX &chs=750x350 &chtt=City+of Interopolis Park Area (Sq Feet) &chl=East Destination|Big Walnut Creek|Morris Williams|T.A. Brown|Bartholomew|Pecan Springs|Dottie Jordan|Andrews &chco=800000
Surprisingly all of the data that goes to make up the chart is stored as: &chd=e:dbPA..AzRNBUD7BX
Output
This output is a pie chart - it could just as easily be a line or bar chart.

Above: The output image as displayed in the FME Universal Viewer.
Further Example
Click here to check another example of WebCharter and ImageFetcher use.
