SetStockHLOCOrder

Syntax graph.SetStockHLOCOrder(high, low, open, close)

Description Sets the order of the data values in a Stock data item.

Stock data items contain four data values: high, low, open, and close. By default, when you send a stock data item to PopChart Server, it assumes that the values will be in this same order. However, if you want to input these data values in a different order, you can change that order with this command.

Example 5.32 illustrates how to use this method. This example tells PopChart Server, when reading a Stock data item, to expect the open value in the second column, then the close value, followed by the high and low values. When importing data from a table or file, column 1 is assumed to be the category name.

Note: You must use this method before you import data to PopChart Server. Otherwise, PopChart Server will interpret the data items normally. You will probably only use this for imported data, particularly data from HTML Tables.

For more information about the Stock data class, refer to "Stock Data Class" in Chapter 12.

Parameters Graph.SetStockHLOCOrder() accepts the following parameters:

high

int

Specifies which column of data will be used for a each data item's high value.

low

int

Specifies which column of data will be used for a each data item's low value.

open

int

Specifies which column of data will be used for a each data item's open value.

close

int

Specifies which column of data will be used for a each data item's close value.

Example 5.32 Changing the Order of Data Values for a Stock Data Item

graph.setStockHLOCOrder(4, 5, 2, 3)