ChartDirector 7.0 (PHP Edition)

JsChartViewer.drawVLine


Usage

drawVLine(id, x, y1, y2, lineStyle)

Description

Draws a vertical 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.
x(Mandatory)The x pixel coordinate of the line, relative to the chart.
y1(Mandatory)The y pixel coordinate of the first end point of the line, relative to the chart.
y2(Mandatory)The y 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.