CLASS
LinearTicks EXTENDS
Ticks
(Defined in: jpgraph.php : 4475) Class usage and Overview
Internal class that handles the drawing and formatting of the tick marks on each axis. This class is accessed through it'sinstance variable in the scale, e.g.
$graph->xaxis->scale->ticks->Set(20,10);
Note: When you manually specify a scale you must also specify the major/minor tick intervall.
See also related classes:
LinearScale and LogScale
Class Methods
function GetMajor()
Return major step size in world coordinates
Description
Return major step size in world coordinates
$majintervall = $graph->xaxis->scale->ticks->Getmajor();
function GetMinor()
// Return minor step size in world coordinates
Description
Return minor step size in world coordinates.
$majintervall = $graph->xaxis->scale->ticks->Getmajor();
function Set($aMajStep,$aMinStep)
// Set Minor and Major ticks (in world coordinates)
Argument | Default | Description |
$aMajStep
| | Distance between major tick marks |
$aMinStep
|
false
| Distance between minor tick marks |
Description
Set Minor and Major tick intervall (in world coordinates)
$graph->yaxis->scale->ticks->Set(40,20);
function SetMajTickPositions($aMajPos,$aLabels)
//(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."
Argument | Default | Description |
$aMajPos
| | No description available |
$aLabels
|
NULL
| No description available |
Description
No description available.
function SetTextLabelStart($aTextLabelOff)
Which tick label should we start with?
Argument | Default | Description |
$aTextLabelOff
| | The number thaht the automatic textscale should start with. |
Description
Normally text labels start at 0. However, automtic text labels can be started with an arbitrary number as specified with the argument to this method.
$graph->xaxis->scale->ticks->SetTextLabelStart(10);
function SetTickPositions($aMajPos,$aMinPos,$aLabels)
Manually specify tick positions for the axis
Argument | Default | Description |
$aMajPos
| | Array of major positions |
$aMinPos
| | Array of minor positions |
$aLabels
| | Array of major label strings |
Description
Manually specify major and minor tick positions for the axis together with the optional label strings. If no label array is specified then the numerical values at the positions of the major tick marks will be used as label strings.
$graph->xaxis->SetMajTickPositions($tickPositions,$tickLabels);