Class LinearTicks Extends Ticks
(Defined in: jpgraph.php : 4032)

LinearTicks | Ticks
AdjustForDST() GetMajor() GetMinor() Set() SetMajTickPositions() SetTextLabelStart() SetTickPositions() | SetColor() SetFormatCallback() SetLabelFormat() SetSide() SetSize() SetWeight() SupressFirst() SupressLast() SupressMinorTickMarks() SupressTickMarks() SupressZeroLabel()

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

LinearTicks ::
AdjustForDST($aFlg)
// For a normal linear type of scale the major ticks will always be multiples// of the minor ticks. In order to avoid any rounding issues the major ticks are// defined as every "step" minor ticks and not calculated separately

Argument | Default | Description
--- | --- | ---
$aFlg | true | No description available

Description:
No description available.

LinearTicks ::
GetMajor()
Return major step size in world coordinates

Description:
Return major step size in world coordinates

Example:

$majintervall = $graph->xaxis->scale->ticks->Getmajor();

LinearTicks ::
GetMinor()
// Return minor step size in world coordinates

Description:
Return minor step size in world coordinates.

Example:

$majintervall = $graph->xaxis->scale->ticks->Getmajor();

LinearTicks ::
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)

Example:

$graph->yaxis->scale->ticks->Set(40,20);

LinearTicks ::
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.

LinearTicks ::
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.

Example:

$graph->xaxis->scale->ticks->SetTextLabelStart(10);

LinearTicks ::
SetTickPositions($aMajPos, $aMinPos, $aLabels)
Manually specify tick positions for the axis

Argument | Default | Description
--- | --- | ---
$aMajPos |  | Array of major positions
$aMinPos | NULL | Array of minor positions
$aLabels | NULL | 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.

Example:

$graph->xaxis->SetMajTickPositions($tickPositions,$tickLabels);