Graph: ezcGraphAxisLabelRenderer
[ ]
[ Gallery ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphAxisLabelRenderer
|
Abstract class to render labels and grids on axis. Will be extended to make it possible using different algorithms for rendering axis labels. [
source]
Implements basic methods to render the grid and steps on a axis.
Parents
ezcBaseOptions
|
--ezcGraphAxisLabelRenderer
Descendents
Properties
|
bool |
read/write
|
$innerStep
Indicates if steps are shown on the inner side of axis. |
|
int |
read/write
|
$labelPadding
Padding of labels. |
|
bool |
read/write
|
$majorStepCount
Count of major steps. |
|
int |
read/write
|
$majorStepSize
Size of major steps. |
|
bool |
read/write
|
$minorStepCount
Count of minor steps. |
|
int |
read/write
|
$minorStepSize
Size of minor steps. |
|
bool |
read/write
|
$outerGrid
Indicates if the grid is shown on the outer side of axis. |
|
bool |
read/write
|
$outerStep
Indicates if steps are shown on the outer side of axis. |
|
bool |
read/write
|
$showLables
Indicates if the labels should be shown |
Member Variables
Inherited Member Variables
From
ezcBaseOptions:
Method Summary
|
public mixed |
determineLineCuttingPoint(
$aStart, $aDir, $bStart, $bDir )
Checks for the cutting point of two lines. |
|
protected void |
drawGrid(
$renderer, $boundings, $position, $direction, $color )
Draw grid |
|
protected void |
drawNonRectangularGrid(
$renderer, $boundings, $position, $direction, $color )
Draw non-rectangular grid lines grid |
|
protected void |
drawRectangularGrid(
$renderer, $boundings, $position, $direction, $color )
Draw rectangular grid |
|
public void |
drawStep(
$renderer, $position, $direction, $axisPosition, $size, $color )
Draw single step on a axis |
|
protected array |
getAxisSpace(
$renderer, $boundings, $axis, $innerBoundings, &$gridBoundings )
Get axis space values |
|
public ezcGraphBoundings |
modifyChartBoundings(
$boundings, $direction )
Modify chart boundings |
|
public ezcGraphCoordinate |
modifyChartDataPosition(
$coordinate )
Modify chart data position |
|
public abstract void |
renderLabels(
$renderer, $boundings, $start, $end, $axis )
Render Axis labels |
Inherited Methods
From
ezcBaseOptions :
Methods
determineLineCuttingPoint
Checks for the cutting point of two lines.
The lines are given by a start position and the direction of the line, both as instances of
ezcGraphCoordinate. If no cutting point could be calculated, because the lines are parallel the function will return false. Otherwise the factor returned can be used to calculate the cutting point using the following equatation: point = $aStart + $factor * $aDir;
We return the factor instead of the resulting point because it can be easily determined from the factor if the cutting point is in "behind" the line starting point, or if the distance to the cutting point is bigger then the direction vector is long ( $factor > 1 ).
Parameters
drawGrid
Draw grid
Draws a grid line at the current position
Parameters
Redefined in descendants as
drawNonRectangularGrid
Draw non-rectangular grid lines grid
Draws a grid line at the current position, for non-rectangular axis.
Parameters
drawRectangularGrid
Draw rectangular grid
Draws a grid line at the current position for rectangular directed axis.
Method special for rectangularly directed axis to minimize the floating point calculation inaccuracies. Those are not necessary for rectangles, while for non-rectangular directed axis.
Parameters
drawStep
Draw single step on a axis
Draws a step on a axis at the current position
Parameters
getAxisSpace
Get axis space values
Get axis space values, depending on passed parameters. If $innerBoundings is given it will be used to caclulat the axis spaces available for label rendering. If not given the legacy method will be used, which uses the xAxisSpace and yAxisSpace values calcualted by the renderer.
Returns an array( $xSpace, $ySpace ), containing the irespective size in pixels. Additionally calculates the grid boundings passed by reference.
Parameters
modifyChartBoundings
Modify chart boundings
Optionally modify boundings of chart data
Parameters
| Name |
Type |
Description |
$boundings |
ezcGraphBoundings |
Current boundings of chart |
$direction |
ezcGraphCoordinate |
Direction of the current axis |
modifyChartDataPosition
Modify chart data position
Optionally additionally modify the coodinate of a data point
Parameters
Redefined in descendants as
renderLabels
Render Axis labels
Render labels for an axis.
Parameters
Redefined in descendants as
Last updated: Mon, 21 Dec 2009