Jun 03 2008

LiveCycle Output ES: Including charts in your documents

Disease:

What if you would like to present your customers with a more graphical view on tabular data, and generate documents that include pie-charts, bar-charts, etcetera.

Prescription:

LiveCycle ES offers various ways to include charts in the generated forms & documents. This time I would like to highlight one alternative in particular. You can make use of Google Chart to call for the right charts. Google Chart makes use of a REST API. It’s a bit like a webservice, but uses simple URL’s to call remote functionality. If you use LiveCycle Designer ES, you can build the right URL and call the Google Service from for instance an initialize event within the page. When the document is rendered, the resulting image is automatically included in your result. A very simple example of a URL for Google Chart is http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World

Now it is also possible include charts such as the one below in your template design.

Sample Chart in PDF

A full sample including the chart above can be downloaded here.

Tip to stay healthy:

I have created a sample for you that you can use yourself. The sample is also used for another post regarding organizing XML data in multiple columns, but since this is good data, a chart is right in context there. Download the package (including an xdp and 2 sample xml files) here. This works stand-alone, but also when using the Output service in your LiveCycle Workbench ES. Please send me your results when you create some exciting charts in your templates.

No responses yet

Trackback URI | Comments RSS

Leave a Reply