CLASS Grid
(Defined in: jpgraph.php : 1989) Class usage and Overview
This class is used to hold all properties of the gridline for a specific axis. The grid setting is accessed through the xgrid and ygrid properties of graph.
By default JpGraph has grid lines for Y-lines turned on and gridlines for X-axis turned off.
Class Methods
function SetColor($aColor)
Set color of grid lines
Argument | Default | Description |
$aColor
| | Color |
Description
Set color of grid lines
$graph->xgrid->SetColor('lightblue');
function SetLineStyle($aType)
Specify if grid line should be dashed, dotted or solid
Argument | Default | Description |
$aType
| | String to specify line type |
Description
Specify if grid should be dashed, dotted or solid. The type is specified with a string which can be either "solid", "dashed" or "dotted".
See also
Image::SetLineStyle
$graph->ygrid->SetLineStyle('dashed');
function SetWeight($aWeight)
Set line weight for grid line
Argument | Default | Description |
$aWeight
| | Line width in pixels |
Description
Set line weight for grid line
$graph->xgrid->SetWeight(2);
function Show($aShowMajor,$aShowMinor)
Specify if both major and minor grid should be displayed
Argument | Default | Description |
$aShowMajor
|
true
| True=Show major grid lines |
$aShowMinor
|
false
| True=Show minor grid lines |
Description
Specify if both major and minor grid should be displayed
$graph->ygrid->Show();