Google Charts API and FileMaker

I’ve been spending most of my time over the past week or so working on integrating the Google Charts API into my upcoming FileMaker Pro CRM solution. For those not familiar with it the Google Charts API was released on December 6, 2007 and lets you dynamically generate charts via an HTTP request. So what’s in it for FileMaker developers? Well with the introduction of the Web Viewer in FileMaker Pro 8.5 you can now compose a chart request in your database and have it displayed on a Web Viewer on a layout. As the data changes the chart updates live. The chart is returned as a .PNG file. Here’s an example:

http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250×100&chl=Hello|World

You obviously require an active Internet connection to use this feature. Learning the API is pretty straightforward and most of the time will be spent getting familiar with the different charts available and the syntax required in the HTTP request, along with which data encoding method you will decide to use.

As I did more testing I was disapointed that, as the chart is a PNG file, I wasn’t able to use the new layout object resizing to resize the chart to expand/contract as the web viewer was resized, which is how I normally setup my web viewer layouts. So I decided to use the Troi URL plugin which is able to GET images from a website. As the URL appears in this format:

http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250×100&chl=Hello|World

you are not able to use that as is to retrieve the PNG file into a FileMaker container field. However there is a new switch in v2.0 and later of the plugin -“-ExtraImageCheck” – which when used with the TURL_Get function checks the returned data to verify if it is an image, even though there is no .png extension on the URL. Now I can set the container field to resize with the layout and the chart grows bigger and smaller – you don’t have control over the resolution of the PNG so it’s appearance will start to degrade as you increase it’s size (you do have control over the image size in pixels).

I’ve been quite impressed with the features of the Google Charts API. It was updated on March 20, 2008 with some new chart types (the maps one is pretty cool) and lifted the previous limit of 50,000 queries per user per day. FMWebschool have a sample (locked) file that you can download here that shows some of the options for FileMaker integration, along with 2 movies here and here. If you know what data you are charting and what chart types you prefer you should be able to integrate Google Charts pretty quickly into your FileMaker Pro solution. Whilst not offering as many features as some of the charting plugins available you can’t complain about the price.

A great future enhancement of the Web Viewer in FileMaker Pro would be the addition of another option for “Google Charts” to make setting up a web viewer to display Google Charts even easier.

Andrew Duncan

FileMaker Pro 9 Bible Book Released

A new FileMaker related book has recently been released – FileMaker Pro 9 Bible, co-authored by Australia’s very own Ray Cologon and Dennis R. Cohen. Weighing in at a massize 768 pages this will be an invaluable addition for most FileMaker developers, both beginner and experienced. I’ve ordered my copy from Amazon already and are looking forward to it’s imminent arival. Members of the FileMaker TechNet and FileMaker Business Alliance will be familiar with the quality of Ray’s contributions to the TechTalk/BizTalk mailing lists. A PDF of the table of contents is available at:

http://www.nightwing.com.au/FileMaker/FMPBible/FMP9Bible_TOC.pdf

(which itself is 21 pages!) which shows the depth of content that this new book offers. I suspect this book will become one of the “must haves” for FileMaker developers worldwide (at least English speaking ones at this stage). Several example extracts are available on the publisher’s website at:

http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470177438,descCd-description.html

New Website Launched

Our new website was launched this week. We’re still working on the content side of things and some additional functionality that will involve PHP and MySQL (we will be able to access these MySQL databases using the External SQL datasources feature of FileMaker Pro 9). Stayed tuned!