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
Some random data to draw from might be useful. A customer entity and an order entity are created in the following ...