ChartDirector 7.1 (.NET Edition)

JsChartViewer.drawHLine


Usage

drawHLine(id, y, x1, x2, lineStyle)

Description

Draws a horizontal line on the chart.

The line will be drawn as an HTML element overlaid on top of the chart. The id argument is an identifier to reference the element in other methods, such as in JsChartViewer.hideObj to hide the element. The identifier should begin with an english alphabet, and consists only of characters A-Z, a-z, 0-9, '-' and '_'.

Arguments

ArgumentDefaultDescription
id(Mandatory)The identifier of the line.
y(Mandatory)The y pixel coordinate of the line, relative to the chart.
x1(Mandatory)The x pixel coordinate of the first end point of the line, relative to the chart.
x2(Mandatory)The x pixel coordinate of the second end point of the line, relative to the chart.
lineStyle(Mandatory)The line style in CSS border property format (eg. "1px solid black").

Return Value

A DOM element representing the line.