ChartDirector 5.1 (.NET Edition)

XYChart.addHLOCLayer


Usage

[VB] Public Function addHLOCLayer(highData As Double(), lowData As Double() [, openData As Double() [, closeData As Double() [, color As Integer ]]]) As HLOCLayer
[C#] public HLOCLayer addHLOCLayer(double[] highData, double[] lowData [, double[] openData [, double[] closeData [, int color ]]]);

Description

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

In this method, all HLOC symbols will be drawn using the color specified in the color argument. Use XYChart.addHLOCLayer3 for multi-color HLOC layers.

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 high values. An empty array means there is no high value data available.
lowData(Mandatory)An array of numbers representing the low values. An empty array means there is no low value data available.
openData[Empty_Array]An array of numbers representing the opening values. An empty array means there is no opening value data available.
closeData[Empty_Array]An array of numbers representing the closing values. An empty array means there is no closing value data 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.