A General Interface application can include charts for visualizing data. Relationships and trends in data sets are often easier to communicate in a chart than in other two-dimensional components, such as matrix views. Like Matrix components, charts display CDF data. Data can originate from any XML data source.
You can build rich and dynamic charts by using prototype components, customizing default properties, and adding child objects as needed. Components are provided for most common chart types, including bar, column, area, line, pie, doughnut, scatter, and bubble. Prototype components are useful for building individual charts, and also for building libraries of customized components. For example, a developer can save a customized prototype component that defines a standard look and feel for all charts of a certain type. Like all General Interface objects, charts are configured using properties and events. Properties allow you to specify layout, fill colors, transparency, and many other characteristics. Events allow a user to trigger a JavaScript event by clicking a chart component. Chart appearance and behavior can be modified at runtime, in response to user input or data changes. The following General Interface features are especially useful for building and displaying charts:
For more information on charting properties and events, see Charting Components. Basic ElementsAll charts share a common set of basic building block. The next figure shows a bar chart, which displays data in horizontal bars. The chart compares productivity by month for two data sets, Group A and Group B. In a chart, a data set like Group B is called a series. Each chart must include at least one series. A bar chart is one example of a Cartesian chart. Cartesian charts display data on an x-y plane, with the x-axis defining the horizontal dimension and the y-axis defining the vertical dimension. An axis can be linear, category, or logarithmic. For axis definitions, see Configuring Axes. Radial charts display data in radial coordinates, rather than x-y coordinates and do not have axes. General Interface Builder provides prototypes for both Cartesian and radial charts. Charting Component LibraryThe Charting component library, which is a General Interface Builder add-in, contains prototype components for building charts. The Charting add-in must be enabled for the project. For more information, see Enabling the Charting Add-in. As shown in the next figure, the Charting component library is organized into chart prototypes, other chart components, and data series:
Prototype SummariesThe Charting component library contains a prototype for each combination of major and minor chart variations. In the General Interface API, major variations correspond to the chart class and minor variations correspond to the type property. This section summarizes each major variation and provides an example.
|
Contents
|










