| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 7)

Using Charts

To create a chart:

Chart Styles

There are three system-defined chart styles:

The Chart-style attribute of a chart determines its style, each style providing a set of default attributes. The diagram on the next page shows an example of each chart type. Chart attributes are described in the section The Chart Class.


Specifying the Chart Style

The Chart-style attribute specifies what style of chart to use. You can further enhance the chart style by using annotations. For example, when using a Column-chart-style, you can optionally add an annotation indicating that a data series should be represented as either a bar (horizontal) or a column (vertical) style.

Sizing a Chart

G2 limits the size of a chart so that it cannot become so large that it consumes all available system resources.

To change the size of a chart:

G2 draws a size box around the chart and displays update dialog, shown here. Move the edges of the size box so that the chart is the size you want and click Update Now in the dialog.


Defining the Data Series for the Chart

The Data-series attribute defines what to plot on the chart. Each data series must evaluate to a quantity list or array.

The order in which you enter each data series determines its numeric reference, which you use in statements. For example, if you enter two data series in this attribute, you would refer to them in an expression with a statement such as:

where the data series number corresponds to the order in which you entered them.

By using the versus statement, you can plot two data series against each other. An example of plotting two data series is:

where q1, q2, and q3 are each quantity-list or quantity-array items.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 7)

Copyright © 1997 Gensym Corporation, Inc.