Data values, pie charts, and bar charts
To produce a graphic report (that is, pie charts or bar charts) the Reporting COM object must associate data values returned from a query with GROUP and INDEX properties. These properties are independent of the chart type, and can be thought of as the rows and columns of a two-dimensional array, respectively:
- Pie charts—Each pie represents a GROUP and the slices of the pie represent an INDEX associated with the group. Thus, if you create a report that summarizes adverse effects by site, you might choose to associate “sites” with the GROUP attribute and “range of possible adverse effects” with the INDEX attribute. The resultset from your query would quantify the occurrences of adverse effects by site. And your ASP program would associate data points of the query with the appropriate GROUP/INDEX values defined in your program.
Each pie would reflect a separate site (a GROUP) and the slices of the pie would represent a particular adverse effect at that site (an INDEX). The size of each slice would indicate the relative number of occurrences of the adverse effect with respect to the total of all occurrences at the site. The color for each slice is determined by the InForm application.
- Bar charts—Each group of bars is associated with a specific INDEX and there are as many “groups of bars” as there are INDEXes. (Each group of bars is labeled via an INDEX label. For example, severe, moderate, mild, and so on, might be labels for adverse effects.) The height of a bar represents the GROUP/INDEX data value (that is, the occurrences of the adverse effect at the site) extracted from the report. Colors for each bar are assigned by the software.
If you create a bar chart using the same data assignment as for the pie chart (that is, GROUP properties represent sites and INDEX properties represent adverse effects), you would see the adverse effects (severe, moderate, mild, and so on) listed on the X axis. For each effect, there would appear a group of bars (the sites), and the height of each bar would represent the occurrences of the adverse effect at the site (the GROUP/INDEX data value).