Image_Graph
[ class tree: Image_Graph ] [ index: Image_Graph ] [ all elements ]

Class: Image_Graph_Axis

Source Location: /Image_Graph-0.3.0dev2/Graph/Axis.php

Class Overview

Image_Graph_Common
   |
   --Image_Graph_Element
      |
      --Image_Graph_Plotarea_Element
         |
         --Image_Graph_Axis

Diplays a normal linear axis (either X- or Y-axis).


Author(s):

Methods


Child classes:

Image_Graph_Axis_Category
A normal axis thats displays labels with a 'interval' of 1.
Image_Graph_Axis_Logarithmic
Diplays a logarithmic axis (either X- or Y-axis).

Inherited Variables

Inherited Methods

Class: Image_Graph_Element

Image_Graph_Element::height()
The height of the element on the canvas
Image_Graph_Element::setBackground()
Sets the background fill style of the element
Image_Graph_Element::setBackgroundColor()
Sets the background color of the element.
Image_Graph_Element::setBorderColor()
Sets the border color of the element.
Image_Graph_Element::setBorderStyle()
Sets the border line style of the element
Image_Graph_Element::setFillColor()
Sets the fill color of the element.
Image_Graph_Element::setFillStyle()
Sets the fill style of the element
Image_Graph_Element::setFont()
Sets the font of the element
Image_Graph_Element::setFontAngle()
Sets the font angle
Image_Graph_Element::setFontColor()
Sets the font color
Image_Graph_Element::setFontSize()
Sets the font size
Image_Graph_Element::setLineColor()
Sets the line color of the element.
Image_Graph_Element::setLineStyle()
Sets the line style of the element
Image_Graph_Element::setPadding()
Sets padding of the element
Image_Graph_Element::showShadow()
Shows shadow on the element
Image_Graph_Element::width()
The width of the element on the canvas
Image_Graph_Element::write()
Writes text to the canvas.

Class: Image_Graph_Common

Image_Graph_Common::Image_Graph_Common()
Constructor [Image_Graph_Common]
Image_Graph_Common::add()
Adds an element to the objects element list.
Image_Graph_Common::addNew()
Creates an object from the class and adds it to the objects element list.

Class Details

[line 49]
Diplays a normal linear axis (either X- or Y-axis).


[ Top ]


Method Detail

Image_Graph_Axis (Constructor)   [line 202]

Image_Graph_Axis &Image_Graph_Axis( [int $type = IMAGE_GRAPH_AXIS_X])

Image_Graph_Axis [Constructor].

Normally a manual creation should not be necessary, axis are created automatically by the Image_Graph_Plotarea constructor unless explicitly defined otherwise


Parameters:

int   $type   —  The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- axis)

[ Top ]

addMark   [line 769]

void addMark( double $value, [double $value2 = false], [ $text = false])

Adds a mark to the axis at the specified value

Parameters:

double   $value   —  The value
double   $value2   —  The second value (for a ranged mark)
   $text   — 

[ Top ]

forceMaximum   [line 347]

void forceMaximum( double $maximum, [bool $userEnforce = true])

Forces the maximum value of the axis

Overridden in child classes as:

Image_Graph_Axis_Category::forceMaximum()
Forces the maximum value of the axis

Parameters:

double   $maximum   —  The maximum value to use on the axis
bool   $userEnforce   —  This value should not be set, used internally

[ Top ]

forceMinimum   [line 332]

void forceMinimum( double $minimum, [bool $userEnforce = true])

Forces the minimum value of the axis

Overridden in child classes as:

Image_Graph_Axis_Category::forceMinimum()
Forces the minimum value of the axis
Image_Graph_Axis_Logarithmic::forceMinimum()
Forces the minimum value of the axis.

Parameters:

double   $minimum   —  The minumum value to use on the axis
bool   $userEnforce   —  This value should not be set, used internally

[ Top ]

hideArrow   [line 367]

void hideArrow( )

Do not show an arrow head on the 'end' of the axis (default)

[ Top ]

setAxisIntersection   [line 834]

void setAxisIntersection( mixed $intersection, [mixed $axis = 'default'])

Set axis intersection.

Sets the value at which the axis intersects other axis, fx. at which Y- value the x-axis intersects the y-axis (normally at 0).

Possible values are 'default', 'min', 'max' or a number between axis min and max (the value will automatically be limited to this range).

For a coordinate system with 2 y-axis, the x-axis can either intersect the primary or the secondary y-axis. To make the x-axis intersect the secondary y-axis at a given value pass IMAGE_GRAPH_AXIS_Y_SECONDARY as second parameter.

  • Since: 0.3.0dev2

Parameters:

mixed   $intersection   —  The value at which the axis intersect the 'other' axis
mixed   $axis   —  The axis to intersect. Only applies to x-axis with both a primary and secondary y-axis available.

[ Top ]

setDataPreProcessor   [line 269]

void setDataPreProcessor( &$dataPreProcessor, Image_Graph_DataPreprocessor $dataPreProcessor)

Sets a data preprocessor for formatting the axis labels

Parameters:

Image_Graph_DataPreprocessor   $dataPreProcessor   —  The data preprocessor
   &$dataPreProcessor   — 

[ Top ]

setLabelInterval   [line 397]

void setLabelInterval( [mixed $labelInterval = 'auto'], [int $level = 1])

Sets an interval for when labels are shown on the axis.

By default 'auto' is used, forcing the axis to calculate a approximate best label interval to be used. Specify an array to use user-defined values for labels.


Overridden in child classes as:

Image_Graph_Axis_Category::setLabelInterval()
Sets an interval for where labels are shown on the axis.

Parameters:

mixed   $labelInterval   —  The interval with which labels are shown
int   $level   —  The label level to set the interval on

[ Top ]

setTickOptions   [line 802]

void setTickOptions( int $start, int $end, [int $level = 1])

Set the major tick appearance.

The positions are specified in pixels relative to the axis, meaning that a value of -1 for start will draw the major tick 'line' starting at 1 pixel outside (negative) value the axis (i.e. below an x-axis and to the left of a normal y-axis).

  • Since: 0.3.0dev2

Parameters:

int   $start   —  The start position relative to the axis
int   $end   —  The end position relative to the axis
int   $level   —  The label level to set the tick options for

[ Top ]

setTitle   [line 422]

void setTitle( string $title, [Image_Graph_Font $font = false])

Sets the title of this axis.

This is used as an alternative (maybe better) method, that using layout's for axis-title generation.

  • Since: 0.3.0dev2

Parameters:

string   $title   —  The title of this axis
Image_Graph_Font   $font   —  The font used for the title

[ Top ]

showArrow   [line 359]

void showArrow( )

Show an arrow head on the 'end' of the axis

[ Top ]

showLabel   [line 256]

void showLabel( int $value)

Shows a label for the the specified values.

Allowed values are combinations of:

  • IMAGE_GRAPH_LABEL_MINIMUM
  • IMAGE_GRAPH_LABEL_ZERO
  • IMAGE_GRAPH_LABEL_MAXIMUM
By default none of these are shows on the axis


Parameters:

int   $value   —  The values to show labels for

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:12:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.