Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Chart User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.2 Graphs with Classic Axes

The Classic axis types are used to plot data along the scaled vertical axis. The data from one or more groups are plotted as a series. The data are spaced uniformly across the x-axis by their indices.

The data axis (Y) is defined by an SRGDecimalScale object, or SRGLogScale for logarithmic scaling, or SRGDateScale for date/time values. The axis is automatically scaled to fit the data values. The axis limits can be set to specific values by calling pD->GetStyle()-> SetUseMaxScale(TRUE) with pD->SetMinRangeY(min) and pD->SetMaxRangeY(max), where pD is a pointer to the display component object.

The horizontal axis (X) is defined by SRGIndexScale. The annotations from the data objects (indices) in group 0 are used to label the axis.

The appearance of the axes can be modified using functions in the display component's style member (e.g. SetShowXTicks, SetShowXGrid, SetAlwaysShowZero). Indeed, the y-axis labels can be completely hidden by calling pD->GetStyle()->SetShowNumerals(FALSE) or the x-axis labels can be hidden by calling SetShowIndices(FALSE). A logarithmic data axis can be selected by calling pD->GetStyle()->SetLog(TRUE).

The following graph types use classic axes:

6.2.1 Line Graphs

Figure 66: CX_GRAPH_LINE

The Line graph draws a line connecting the data points of a group. The data points can be optionally covered by wigets or point objects.

The appearance of the data line and wigets are determined by the style member of the individual data items. See Section 7.11, "Data Object Appearance," for details.

Classic Axis. One group per series.

6.2.2 Line Only Graphs

A Line Only graph is a Line graph with no wigets.

Classic Axis. One group per series.

6.2.3 Step Graphs

The Step graph is similar to a Line graph except that horizontal and vertical line segments (forming a step) connect the data points of a group. The data points can be optionally covered by wigets or point objects.

The appearance of the data line and wigets are determined by the style object of the individual data items.

Classic Axis. One group per series.

6.2.4 Step Line Only Graphs

Figure 67: CX_GRAPH_STEPLO

A Step–Line Only graph is a Step graph with no wigets.

Classic Axis. One group per series.

6.2.5 Area Graphs

Figure 68: CX_GRAPH_AREA

An Area graph is similar to a Line graph except the area below the data line is filled. If more than one group of data are plotted, they are drawn in order of decreasing average value so that the groups with smaller values are not obscured by the groups with larger values.

The appearance of the data line and the filled area for each group is determined by the group's style object.

Classic Axis. One group per series.

6.2.6 Strata Graphs

Figure 69: CX_GRAPH_STRATA

A Strata graph is similar to an Area graph, but it shows the summed total of a particular index over all groups. The height of the combined area represents the total over all groups. Sub-areas show how much each group contributes to the total.

For example, a Strata chart could be used to show the market share of individual car manufacturers (groups) over several years (indices).

The appearance of the data line and the filled area for each group is determined by the group's style object.

Classic Axis. One group per series.

6.2.7 Freestyle Graphs

Figure 70: CX_GRAPH_FREESTYLE

A Freestyle graph is one in which the data items themselves are programmed with individual object styles. By setting up or even dynamically changing the style for each SRGraphData item, you can change the appearance of a graph. One series may have lines and wigets. Another series may have bar graphs, and a third series could have polygonal pictographs. See Section 7.11, "Data Object Appearance," for details.

Classic Axis. One group per series.

6.2.8 Stock Graphs

Figure 71: CX_GRAPH_STOCK

A Stock graph displays high, low, and current or close data. The high and low information is obtained from the CScale member of the individual data items (SRGraphData). These values are updated automatically as values are sequentially set in the data items. In a Stock chart, a small rectangle is drawn from the current (close) value to the high value. Another bar is drawn, in a different color, from the current value to the low value. The current value is also covered by a wiget.

The style member of the group (SRGraphDataList) determines the appearance of the bars. The wigets' color and shape are determined automatically. For example, the snippet below demonstrates setting the colors of the bars for group g:

Classic Axis. One group per series, using CScale data.

6.2.9 Area Stock Graphs

Figure 72: CX_GRAPH_AREASTOCK

The Area Stock graph displays the same information as the Stock graph by forming filled polygons or ribbons from the high-current and low-current values of the data items in the series. No wigets are drawn.

The style member of the group determines the ribbons' appearance.

Classic Axis. One group per series, using CScale data.

6.2.10 Candle Graphs

Figure 73: CX_GRAPH_CANDLE

A Candle graph displays high, low, open, and close data. A single series is held in four consecutive groups. Group zero is the high value; group one, the low; group two, the open; and group three, the close. The sequence repeats thereafter with group four being the high values of the second series.

A small rectangle covers the range between the open and close values. A vertical line connects the high and low values.

The appearance of the lines and bars is determined by the settings in the style member of the individual data items of the first group. If the interior and frame styles of a data item is set to NONE, the style of the first group is used (SRGraphDataList object).

Classic Axis. Four groups per series.

6.2.11 Shaded Candle Graph

Figure 74: CX_GRAPH_SHADEDCANDLE

The Shaded Candle graph is a variation of the Candle graph in which the bars between the open and close values are shaded to indicate which is higher. The lighter color is toward the open value.

Classic Axis. Four groups per series.

6.2.12 Hi-Low-Open-Close Graphs

Figure 75: CX_GRAPH_HILO_OPENCLOSE

The Hi-Low-Open-Close graph displays the same information as the Candle graph. A vertical line is drawn from the low value to the high value. The open value is indicated by a horizontal line segment to the left of the vertical Hi-Low line. A line to the right represents the close value.

Classic Axis. Four groups per series.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.