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

Class: Image_Graph_Axis

Source Location: /Image_Graph-0.3.0dev1/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).


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).
Image_Graph_Axis_Multidimensional
Abstract class of a multidimensional 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::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::add()
Adds an element to the objects element list, the new Image_Graph_elements parent is automatically set
Image_Graph_Common::addNew()
Creates an object from the class specified and adds it to the objects element list.

Class Details

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


[ Top ]


Method Detail

Image_Graph_Axis (Constructor)   [line 141]

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 {@see 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 535]

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 269]

void forceMaximum( double $maximum)

Forces the maximum value of the axis

Overridden in child classes as:

Image_Graph_Axis_Category::forceMaximum()
Forces the maximum value of the axis A maximum cannot be set on a SequentialAxis, it is always the number of labels passed to the constructor.

Parameters:

double   $maximum   —  The maximum value to use on the axis

[ Top ]

forceMinimum   [line 259]

void forceMinimum( double $minimum)

Forces the minimum value of the axis

Overridden in child classes as:

Image_Graph_Axis_Category::forceMinimum()
Forces the minimum value of the axis A minimum cannot be set on a SequentialAxis, it is always 0.
Image_Graph_Axis_Logarithmic::forceMinimum()
Forces the minimum value of the axis.

Parameters:

double   $minimum   —  The minumum value to use on the axis

[ Top ]

hideArrow   [line 286]

void hideArrow( )

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

[ Top ]

setDataPreProcessor   [line 178]

void setDataPreProcessor( &$dataPreProcessor, Image_Graph_DataPreprocessor $dataPreProcessor)

Sets a data preprocessor for formatting the axis labels
  • See: Image_Graph_DataPreprocessor

Parameters:

Image_Graph_DataPreprocessor   $dataPreProcessor   —  The data preprocessor
   &$dataPreProcessor   — 

[ Top ]

setLabelInterval   [line 297]

void setLabelInterval( [double $labelInterval = 'auto'])

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

By default AXIS_INTERVAL_AUTO is used, forcing the axis to calculate a approximate best label interval to be used


Overridden in child classes as:

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

Parameters:

double   $labelInterval   —  The interval with which labels are shown

[ Top ]

showArrow   [line 278]

void showArrow( )

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

[ Top ]

showLabel   [line 166]

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 13:57:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.