Graph: ezcGraphChartElementAxis
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphChartElementAxis
|
Basic axis class [
source]
Parents
ezcBaseOptions
|
--ezcGraphChartElement
|
--ezcGraphChartElementAxis
Descendents
| Child Class |
Description |
| ezcGraphChartElementDateAxis |
Class to represent date axis. Date axis will try to find a "nice" interval based on the values on the x axis. If non numeric values are given, ezcGraphChartElementDateAxis will convert them to timestamps using PHPs strtotime function.
|
| ezcGraphChartElementNumericAxis |
Class to represent a numeric axis. The axis tries to calculate "nice" start and end values for the axis scale. The used interval is considered as nice, if it is equal to [1,2,5] * 10^x with x in [.., -1, 0, 1, ..].
|
| ezcGraphChartElementLabeledAxis |
Class to represent a labeled axis. Values on the x axis are considered as strings and used in the given order.
|
| ezcGraphChartElementLogarithmicalAxis |
Class to represent a numeric axis. The axis tries to calculate "nice" start and end values for the axis scale. The used interval is considered as nice, if it is equal to [1,2,5] * 10^x with x in [.., -1, 0, 1, ..].
|
Properties
|
ezcGraphAxisLabelRenderer |
read/write
|
$axisLabelRenderer
AxisLabelRenderer used to render labels and grid on this axis. |
|
float |
read/write
|
$axisSpace
Percent of the chart space used to display axis labels and arrowheads instead of data values. |
|
float |
read/write
|
$chartPosition
Position of the axis in the chart. Only useful for additional axis. The basic chart axis will be automatically positioned. |
|
string |
read/write
|
$formatString
Formatstring to use for labeling of the axis. |
|
bool |
read
|
$initialized
Property indicating if some values were associated with axis, or a scaling has been set manually. |
|
string |
read/write
|
$label
Axis label |
|
callback |
read/write
|
$labelCallback
Callback function to format chart labels. Function will receive two parameters and should return a reformatted label. string function( label, step ) |
|
int |
read/write
|
$labelMargin
Distance between label an axis |
|
int |
read/write
|
$labelSize
Size of axis label |
|
ezcGraphColor |
read/write
|
$majorGrid
Color of major majorGrid. |
|
mixed |
read/write
|
$majorStep
Labeled major steps displayed on the axis. @TODO: Should be moved to numeric axis. |
|
int |
read/write
|
$maxArrowHeadSize
Maximum Size used to draw arrow heads. |
|
int |
read/write
|
$minArrowHeadSize
Minimum Size used to draw arrow heads. |
|
ezcGraphColor |
read/write
|
$minorGrid
Color of minor majorGrid. |
|
mixed |
read/write
|
$minorStep
Non labeled minor steps on the axis. @TODO: Should be moved to numeric axis. |
|
float |
read/write
|
$nullPosition
The position of the null value. |
Member Variables
Inherited Member Variables
From
ezcBaseOptions:
Method Summary
|
public abstract void |
addData(
$values )
Add data for this axis |
|
public abstract void |
calculateAxisBoundings(
)
Calculate axis bounding values on base of the assigned values |
|
public abstract float |
getCoordinate(
$value )
Get coordinate for a dedicated value on the chart |
|
public abstract string |
getLabel(
$step )
Get label for a dedicated step on the axis |
|
public abstract integer |
getMajorStepCount(
)
Return count of major steps |
|
public abstract integer |
getMinorStepCount(
)
Return count of minor steps |
|
public array( |
getSteps(
)
Return array of steps on this axis |
|
public abstract bool |
isZeroStep(
$step )
Is zero step |
|
public ezcGraphBoundings |
render(
$renderer, $boundings )
Render the axis |
|
public void |
setFromPalette(
$palette )
Set colors and border fro this element |
|
public void |
__set(
$propertyName, $propertyValue )
__set |
Inherited Methods
From
ezcGraphChartElement :
From
ezcBaseOptions :
Methods
addData
void addData(
$values )
Add data for this axis
Parameters
| Name |
Type |
Description |
$values |
array |
|
Redefined in descendants as
calculateAxisBoundings
void calculateAxisBoundings(
)
Calculate axis bounding values on base of the assigned values
Redefined in descendants as
getCoordinate
float getCoordinate(
float
$value )
Get coordinate for a dedicated value on the chart
Parameters
| Name |
Type |
Description |
$value |
float |
Value to determine position for |
Redefined in descendants as
getLabel
string getLabel(
integer
$step )
Get label for a dedicated step on the axis
Parameters
| Name |
Type |
Description |
$step |
integer |
Number of step |
Redefined in descendants as
getMajorStepCount
integer getMajorStepCount(
)
Return count of major steps
Redefined in descendants as
getMinorStepCount
integer getMinorStepCount(
)
Return count of minor steps
Redefined in descendants as
getSteps
array( getSteps(
)
Return array of steps on this axis
Redefined in descendants as
isZeroStep
bool isZeroStep(
int
$step )
Is zero step
Returns true if the given step is the one on the initial axis position
Parameters
| Name |
Type |
Description |
$step |
int |
Number of step |
Redefined in descendants as
render
Render the axis
Parameters
| Name |
Type |
Description |
$renderer |
ezcGraphRenderer |
Renderer |
$boundings |
ezcGraphBoundings |
Boundings for the axis |
Redefinition of
setFromPalette
Set colors and border fro this element
Parameters
Redefinition of
__set
void __set(
mixed
$propertyName, mixed
$propertyValue )
__set
Parameters
| Name |
Type |
Description |
$propertyName |
mixed |
|
$propertyValue |
mixed |
|
Throws
| Class | Description |
ezcBaseValueException |
If a submitted parameter was out of range or type. |
ezcBasePropertyNotFoundException |
If a the value for the property options is not an instance of |
Last updated: Mon, 17 Dec 2007