Path

ez components / documentation / api reference / 2007.1.1 / graph


eZ Components 2007.1.1

Graph: ezcGraphAxisLabelRenderer

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

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]

Parents

ezcBaseOptions
   |
   --ezcGraphAxisLabelRenderer

Descendents

Child Class Description
ezcGraphAxisBoxedLabelRenderer Renders axis labels centered between two axis steps like normally used for bar charts.
ezcGraphAxisCenteredLabelRenderer Renders axis labels centered below the axis steps.
ezcGraphAxisRotatedLabelRenderer Renders axis labels centered between two axis steps like normally used for bar charts.
ezcGraphAxisNoLabelRenderer Renders axis labels like known from charts drawn in analysis
ezcGraphAxisExactLabelRenderer Renders axis labels like known from charts drawn in analysis
ezcGraphAxisRadarLabelRenderer Renders axis labels centered below the axis steps.

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

protected ezcGraphDriver $driver
Driver to render axis labels

Inherited Member Variables

From ezcBaseOptions:
protected  ezcBaseOptions::$properties

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
public void drawStep( $renderer, $position, $direction, $axisPosition, $size, $color )
Draw single step on a axis
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 :
public ezcBaseOptions ezcBaseOptions::__construct()
Construct a new options object.
public void ezcBaseOptions::merge()
Merge an array into the actual options object.
public bool ezcBaseOptions::offsetExists()
Returns if an option exists.
public mixed ezcBaseOptions::offsetGet()
Returns an option value.
public void ezcBaseOptions::offsetSet()
Set an option.
public void ezcBaseOptions::offsetUnset()
Unset an option.

Methods

determineLineCuttingPoint

mixed determineLineCuttingPoint( ezcGraphCoordinate $aStart, ezcGraphCoordinate $aDir, ezcGraphCoordinate $bStart, ezcGraphCoordinate $bDir )
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

Name Type Description
$aStart ezcGraphCoordinate  
$aDir ezcGraphCoordinate  
$bStart ezcGraphCoordinate  
$bDir ezcGraphCoordinate  

drawGrid

void drawGrid( ezcGraphRenderer $renderer, $boundings, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, ezcGraphColor $color )
Draw grid
Draws a grid line at the current position

Parameters

Name Type Description
$renderer ezcGraphRenderer Renderer to draw the grid with
$boundings ezcGraphBoundings Boundings of axis
$position ezcGraphCoordinate Position of step
$direction ezcGraphCoordinate Direction of axis
$color ezcGraphColor Color of axis

Redefined in descendants as

Method Description
ezcGraphAxisRadarLabelRenderer::drawGrid() Draw grid

drawStep

void drawStep( ezcGraphRenderer $renderer, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, int $axisPosition, int $size, ezcGraphColor $color )
Draw single step on a axis
Draws a step on a axis at the current position

Parameters

Name Type Description
$renderer ezcGraphRenderer Renderer to draw the step with
$position ezcGraphCoordinate Position of step
$direction ezcGraphCoordinate Direction of axis
$axisPosition int Position of axis
$size int Step size
$color ezcGraphColor Color of axis

modifyChartBoundings

ezcGraphBoundings modifyChartBoundings( $boundings, ezcGraphCoordinate $direction )
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

ezcGraphCoordinate modifyChartDataPosition( ezcGraphCoordinate $coordinate )
Modify chart data position
Optionally additionally modify the coodinate of a data point

Parameters

Name Type Description
$coordinate ezcGraphCoordinate Data point coordinate

Redefined in descendants as

Method Description
ezcGraphAxisBoxedLabelRenderer::modifyChartDataPosition() Modify chart data position
ezcGraphAxisRotatedLabelRenderer::modifyChartDataPosition() Modify chart data position

renderLabels

void renderLabels( ezcGraphRenderer $renderer, $boundings, ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphChartElementAxis $axis )
Render Axis labels
Render labels for an axis.

Parameters

Name Type Description
$renderer ezcGraphRenderer Renderer used to draw the chart
$boundings ezcGraphBoundings Boundings of the axis
$start ezcGraphCoordinate Axis starting point
$end ezcGraphCoordinate Axis ending point
$axis ezcGraphChartElementAxis Axis instance

Redefined in descendants as

Method Description
ezcGraphAxisBoxedLabelRenderer::renderLabels() Render Axis labels
ezcGraphAxisCenteredLabelRenderer::renderLabels() Render Axis labels
ezcGraphAxisRotatedLabelRenderer::renderLabels() Render Axis labels
ezcGraphAxisNoLabelRenderer::renderLabels() Render Axis labels
ezcGraphAxisExactLabelRenderer::renderLabels() Render Axis labels
ezcGraphAxisRadarLabelRenderer::renderLabels() Render Axis labels

Last updated: Wed, 28 Nov 2007