Class PlotLine
(Defined in: jpgraph_plotline.php : 17)

PlotLine

HideLegend()
SetColor()
SetDirection()
SetLegend()
SetLineStyle()
SetPosition()
SetWeight()
__construct()

Class usage and Overview
A plot line represents a horizontal or vertical line in the plot at an arbitrary position. A plot line can be added to all X-Y types of plots/graphs.

See also related classes:
Graph

Class Methods

PlotLine ::
HideLegend($f)
Hide legend

Argument | Default | Description
--- | --- | ---
$f | true | True/False

Description:
Hide legend

PlotLine ::
SetColor($aColor)
Specify color of line

Argument | Default | Description
--- | --- | ---
$aColor |  | Color

Description:
Set color for line. Note. Colors can also be set in the creation of a PlotLine
See also:

- PlotLine::__construct()

Example:

$plotline->SetColor('red');

PlotLine ::
SetDirection($aDir)
Specify direction of line

Argument | Default | Description
--- | --- | ---
$aDir |  | Direction, horizontal or vertical line

Description:
Specify direction of line. Valid arguments are:

- VERTICAL
- HORIZONTAL

Note: Direction can also be specified in the creation of a plot line.
See also:

- PlotLine::__construct()

Example:

$plotline->SetDirection(VERTICAL);
$plotline->SetColor('red');
$graph->AddLine($plotline);

PlotLine ::
SetLegend($aLegend, $aCSIM, $aCSIMAlt, $aCSIMWinTarget)
Set legend text

Argument | Default | Description
--- | --- | ---
$aLegend |  | Legend text
$aCSIM | '' | CSIM target
$aCSIMAlt | '' | CSIM Alt text
$aCSIMWinTarget | '' | No description available

Description:
Set legend text

PlotLine ::
SetLineStyle($aStyle)

Argument | Default | Description
--- | --- | ---
$aStyle |  | No description available

Description:
No description available.

PlotLine ::
SetPosition($aScalePosition)
Specify position for plot line

Argument | Default | Description
--- | --- | ---
$aScalePosition |  | Scale position

Description:
Specify position for plot line. If the line is vertical the position is interpretated as the x-coordinate and if it is horizontal then the positoin is interpretatedas the Y-coordinate. Note: Position can also be specified in the creation of the line.

Example:

$plotline->SetDirection(HORIZONTAL);
$plotline->SetPosition(25);
$graph->AddLine($plotline);

PlotLine ::
SetWeight($aWeight)
Specify line weight

Argument | Default | Description
--- | --- | ---
$aWeight |  | Line weight in pixels

Description:
Specify line weight. Note. Line weight can also be specified in the creation of the line.
See also:

- PlotLine::__construct()

Example:

$plotline->SetColor('red');
$plotline->SetDirection(VERTICAL);
$plotline->SetPosition(35);
$plotline->SetWeight(2);

PlotLine ::
__construct($aDir, $aPos, $aColor, $aWeight)
Construct a new plot line

Argument | Default | Description
--- | --- | ---
$aDir | HORIZONTAL | Direction, HORIZONTAL or VERTICAL
$aPos | 0 | Position
$aColor | 'black' | Color
$aWeight | 1 | Line weight

Description:
Create a new horizontal or vertical line in the graph at a specific position. The graph can the be added to the graph with a call to the AddLine

Example:

// Add mark graph with static lines
$line = new PlotLine(HORIZONTAL,0,"black",2);
$graph->AddLine($line);