Getting information about the data

There are quite a few methods for getting information about data in a graph in a DataWindow control at runtime. For all methods, you provide the name of the graph within the DataWindow as the first argument. You can provide your own name for graph controls when you insert them in the DataWindow painter. If the presentation style is Graph, you do not need to name the graph.

These methods get information about the data and its display. For several of them, an argument is passed by reference to hold the requested information:

Table 12-1: Common methods for graph DataWindows

Method

Information provided

CategoryCount

The number of categories in a graph

CategoryName

The name of a category, given its number

DataCount

The number of data points in a series

FindCategory

The number of a category, given its name

FindSeries

The number of a series, given its name

GetData

The value of a data point, given its series and position (superseded by GetDataValue, which is more flexible)

GetDataPieExplode

The percentage of the pie's radius that the pie slice is to be moved away from the center (exploded)

GetDataStyle

The color, fill pattern, or other visual property of a specified data point

GetDataValue

The value of a data point, given its series and position

GetSeriesStyle

The color, fill pattern, or other visual property of a specified series

SeriesCount

The number of series in a graph

SeriesName

The name of a series, given its number