Graph: ezcGraphAxisRotatedLabelRenderer
[ ]
[ Gallery ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphAxisRotatedLabelRenderer
|
Can render axis labels rotated, so that more axis labels fit on one axis. [
source]
Produces best results if the axis space was increased, so that more spcae is available below the axis.
1. $chart->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
2.
3. // Define angle manually in degree
4. $chart->xAxis->axisLabelRenderer->angle = 45;
5.
6. // Increase axis space
7. $chart->xAxis->axisSpace = .2;
Parents
ezcBaseOptions
|
--ezcGraphAxisLabelRenderer
|
--ezcGraphAxisRotatedLabelRenderer
Descendents
Properties
|
float |
read/write
|
$angle
Angle of labels on axis in degrees. |
Member Variables
|
protected ezcGraphVector |
$direction
Store direction for later coordinate modifications |
|
protected float |
$offset
Store coordinate offset for later coordinate modifications |
|
protected array(ezcGraphStep) |
$steps
Store step array for later coordinate modifications |
|
protected float |
$widthModifier
Store coordinate width modifier for later coordinate modifications |
Inherited Member Variables
From
ezcGraphAxisLabelRenderer:
From
ezcBaseOptions:
Method Summary
|
protected float |
calculateLabelLength(
$start, $end, $xSpace, $ySpace, $axisBoundings )
Calculate general label length |
|
protected float |
calculateLabelSize(
$steps, $nr, $step, $xSpace, $ySpace, $axisBoundings )
Calculate label size |
|
protected void |
determineAngle(
$steps, $xSpace, $ySpace, $axisBoundings )
Determine label angle |
|
protected float |
determineTextOffset(
$axis, $steps )
Determine text offset. |
|
public ezcGraphCoordinate |
modifyChartDataPosition(
$coordinate )
Modify chart data position |
|
public void |
renderLabels(
$renderer, $boundings, $start, $end, $axis, [$innerBoundings = null] )
Render Axis labels |
|
protected void |
renderLabelText(
$renderer, $axis, $position, $label, $degTextAngle, $labelLength, $labelSize, $lengthReducement )
Render label text. |
Inherited Methods
From
ezcGraphAxisLabelRenderer :
From
ezcBaseOptions :
Methods
calculateLabelLength
Calculate general label length
Parameters
calculateLabelSize
float calculateLabelSize(
$steps, int
$nr, array
$step, float
$xSpace, float
$ySpace,
$axisBoundings )
Calculate label size
Calculate the size of a single lable in a single step.
Parameters
| Name |
Type |
Description |
$steps |
array |
|
$nr |
int |
|
$step |
array |
|
$xSpace |
float |
|
$ySpace |
float |
|
$axisBoundings |
ezcGraphBoundings |
|
determineAngle
void determineAngle(
$steps,
$xSpace,
$ySpace,
$axisBoundings )
Determine label angle
Determine the optiomal angle for the axis labels, of no angle has been provided by the user.
Parameters
| Name |
Type |
Description |
$steps |
array |
|
$xSpace |
|
|
$ySpace |
|
|
$axisBoundings |
ezcGraphBoundings |
|
determineTextOffset
Determine text offset.
Calculate the label offset and angle, from the configured or evaluated text angle.
Returns the text angle in degrees.
Parameters
modifyChartDataPosition
Modify chart data position
Optionally additionally modify the coodinate of a data point
Parameters
Redefinition of
Redefined in descendants as
renderLabels
Render Axis labels
Render labels for an axis.
Parameters
Redefinition of
Redefined in descendants as
renderLabelText
Render label text.
Render the text of a single label, depending on the position, length and rotation of the label.
Parameters
Last updated: Mon, 21 Dec 2009