GoogleBarChart Control

The GoogleBarChart control allows you to graph your data as a horizontal bar chart within your Newlook form.

Client support

   Newlook Smartclient

   Newlook Server

Use

A bar chart is useful when you have several categories of data that you would like to compare visually.

The GoogleBarChart control requires a 2-dimensional data source, where each row of data represents a horizontal bar in the chart. One column (specified in the DomainAxis property) will determine the label or category of each bar in the chart while a second column (specified in the DataAxis property) will determine the value of each category, in other words, the horizontal length of each bar.

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 bar. The second column, Amount, has been set as the DataAxis. It determines the horizontal length of each bar.

See Also

IFrame control | HTML control


© 2004-2021 looksoftware. All rights reserved.