O'Reilly logo

Play Framework Cookbook by Alexander Reelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Google Chart API as a tag

Sooner or later, one of your clients will ask for graphical representation of something in your application. It may be time-based (revenue per day/month/year), or more arbitrary. Instead of checking available imaging libraries like JFreeChart, and wasting your own CPU cycles when creating images, you can rely on the Google Chart API that is available at http://code.google.com/apis/chart/.

This API supports many charts, some of which do not even resemble traditional graphs. We will come to this later in the recipe.

The source code of the example is available at examples/chapter4/mashup-chart-api.

How to do it...

Some random data to draw from might be useful. A customer entity and an order entity are created in the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required