ChartDirector Ver 3.1 (PHP Edition Edition)

XYChart.addHLOCLayer


Usage

addHLOCLayer(highData, lowData[, openData[, closeData[, color]]])

Description

Add a high-low-open-close (HLOC) layer to the XYChart, and specify the data sets to use for drawing the layer.

By default, the whole HLOC symbol will be drawn using the color specified in the color argument.

Internally, ChartDirector maps the colors of different parts of the HLOC symbol to data set colors as shown in the following table. You may control the colors of the HLOC symbol in more details by setting the data set colors directly. The data set objects can be obtained using Layer.getDataSet, and the colors can be changed using DataSet.setDataColor.

HLOC Symbol ColorData Set Color
Central LineData Color for the first data set (index = 0)
Open Mark LineData Color for the third data set (index = 2)
Close Mark LineData Color for the fourth data set (index = 3)

Arguments

ArgumentDefaultDescription
highData(Mandatory)An array of numbers representing the highest value data set.
lowData(Mandatory)An array of numbers representing the lowest value data set.
openData[Empty_Array]An array of numbers representing the opening value data set. An empty array means there is no opening value data set available.
closeData[Empty_Array]An array of numbers representing the closing value data set. An empty array means there is no closing value data set available.
color-1The color to draw the HLOC symbol. -1 means that the color is automatically selected from the palette.

Return Value

A HLOCLayer object representing the HLOC layer created.