GooglePieChart Control

The GooglePieChart control allows you to represent your data as a Pie Chart within your Newlook form.

Client support

   Newlook Smartclient

   Newlook Server

Use

This control is useful when you are trying to compare each category of data, proportionally against the whole. Pie charts are only useful if your data contains a group of categories and a measure of each group that combine to make up a whole.

The GooglePieChart control requires a 2-dimensional data source, where each row of data represents a slice of the pie. One column, specified as the DomainAxis property, will determine the label or category of each pie chart segment. A second column, specified in the DataAxis property, will determine the value of each slice, in other words, the size of each pie chart segment.

There are two ways of specifying the data source for your chart:

1. Any datagrid control on your form can be used as the data source for you chart. The datagrid can be generated from a host subfile or bound to an external datasource.

2. If you have OpenLook installed on your IBMi, the SQL function can be used to query a host database file and return the results of that query as data source of your chart.

Regardless of which data source you use, the first column of data will be automatically assigned to the DomainAxis and the second column to the DataAxis. You can change these values however if you wish to chart different columns of data.

In the example below, the data source is an existing grid on our form. The first column of data, Language, has been set as the DomainAxis. It is represented as labels on each segment. The second column, Amount, has been set as the DataAxis. It determines the proportional size of each segment.

 

Client limitations

Server only

See Also

GoogleBarChart control