You want to use a web service to create charts. In this example we will use the Google Chart web service: *. Users are each allowed to generate up to 50,000 charts per day. The Google Chart application takes several parameters from the URL. For a simple Pie Chart these might include: http://chart.apis.google.com/chart? cht=p &chd=t:10,20,30,40,20 &chl=Amount|Indicator|Code|Date|Text &chs=400x300 Where: http://chart.apis.google.com/chart? - is the Chart API's base URL The ampersand (&) separates parameters. cht=p is a code for the chart's type. For example p=2D Pie Chart and p3-3D Pie Chart chd=t:10,20,30,40 is the chart's data using t format (t:10,20,30) or s format where (s:) a=1 and z=26 chs=400x300 - is the chart's size in pixels. chl=Amount|Indicator|Code|Date|Text are the labels for the Pie Chart. Our next step is to put these REST parameters into an XForms instance and hook the instance up to input controls. Here are the parameters for a piechart type, data, label and size information. We will submit our XForms data to the server using the following submission statement. Here is a sample input form for chart parameters: Here is a sample output chart generated form this application. Execute   Google Pie Chart Demo     p 400x200 t:1,2,60,40,2 Amount|Indicators|Code|D|Text           Google PieChart Demo  Chart Type:   Pie Chart - flat p   Pie Chart - 3D p3    Data: (t:5,10,20):    Labels: (A|B)    Create Chart    This is actually one of the most simple applications. Google Charts has five chart types and hundreds of combinations of parameters. The Chart Types are (cht) Line charts Bar charts Pie charts Venn diagrams Scatter plots One way to test these is to generate a variety of charts with some sample XForms. Next Page: Venn Diagram | Previous Page: Pie Chart Home: XForms
{'wiki_source': 'wikibooks', 'other_info': "{'content_model': 'wikitext', 'language': 'en', 'title': 'XForms/Google Charts', 'type': 'text'}"}