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

Class: Image_Graph_Plotarea

Source Location: /Image_Graph-0.8.0/Graph/Plotarea.php

Class Overview

Image_Graph_Common
   |
   --Image_Graph_Element
      |
      --Image_Graph_Plotarea_Element
         |
         --Image_Graph_Layout
            |
            --Image_Graph_Plotarea

Plot area used for drawing plots.


Author(s):

Version:

  • Release: 0.8.0

Copyright:

  • 2003-2009 The PHP Group

Methods


Child classes:

Image_Graph_Plotarea_Map
Plot area used for map plots.
Image_Graph_Plotarea_Radar
Plot area used for radar plots.

Inherited Variables

Inherited Methods

Class: Image_Graph_Layout

Image_Graph_Layout::Image_Graph_Layout()
Image_Graph_Layout [Constructor]

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.
Image_Graph_Element::_clip()
Clip the canvas to the coordinates of the element

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.
Image_Graph_Common::hide()
Hide the element

Class Details

[line 54]
Plot area used for drawing plots.

The plotarea consists of an x-axis and an y-axis, the plotarea can plot multiple charts within one plotares, by simply adding them (the axis' will scale to the plots automatically). A graph can consist of more plotareas



[ Top ]


Method Detail

Image_Graph_Plotarea (Constructor)   [line 136]

void Image_Graph_Plotarea( [string $axisX = 'Image_Graph_Axis_Category'], [string $axisY = 'Image_Graph_Axis'], [string $direction = 'vertical'])

Image_Graph_Plotarea [Constructor]

Parameters:

string   $axisX   —  The class of the X axis (if omitted a std. axis is created)
string   $axisY   —  The class of the Y axis (if omitted a std. axis is created)
string   $direction   —  The direction of the plotarea - 'horizontal' or 'vertical' (default)

[ Top ]

add   [line 207]

Image_Graph_Element &add( Image_Graph_Element &$element, [int $axis = IMAGE_GRAPH_AXIS_Y])

Adds an element to the plotarea

Overrides Image_Graph_Common::add() (Adds an element to the objects element list.)

Parameters:

Image_Graph_Element   &$element   —  The element to add
int   $axis   —  The axis to associate the element with, either IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, IMAGE_GRAPH_AXIS_Y_SECONDARY or the shorter string notations 'x', 'y' or 'ysec' (defaults to IMAGE_GRAPH_AXIS_Y)

[ Top ]

clearAxis   [line 603]

void clearAxis( )

Clears/removes the axis

[ Top ]

getAxis   [line 619]

Image_Graph_Axis &getAxis( [int $axis = IMAGE_GRAPH_AXIS_X])

Get axis.

Possible values are IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, IMAGE_GRAPH_AXIS_Y_SECONDARY or a short hand notation using string identifiers: 'x', 'y', 'ysec'

  • Return: The axis

Parameters:

int   $axis   —  The axis to return

[ Top ]

hideAxis   [line 585]

void hideAxis( [string $axis = false])

Hides the axis

Overridden in child classes as:

Image_Graph_Plotarea_Map::hideAxis()
Hides the axis

Parameters:

string   $axis   —  Which axis? (x, y, y_sec)

[ Top ]

setAxisPadding   [line 1008]

void setAxisPadding( mixed $value, [mixed $position = false])

Set the axis padding for a specified position.

The axis padding is padding "inside" the plotarea (i.e. to put some space between the axis line and the actual plot).

This can be specified in a number of ways:

1) Specify an associated array with 'left', 'top', 'right' and 'bottom' indices with values for the paddings. Leave out 2nd parameter.

2) Specify an overall padding as the first parameter

3) Specify the padding and position with position values as mentioned above

Normally you'd only consider applying axis padding to a category x-axis.


Parameters:

mixed   $value   —  The value/padding
mixed   $position   —  The "position" of the padding

[ Top ]

setPlotBorderStyle   [line 191]

void setPlotBorderStyle( Image_Graph_Line &$plotBorderStyle)

Sets the plot border line style of the element.
  • Deprecated: 0.3.0dev2 - 2004-12-16

Parameters:

Image_Graph_Line   &$plotBorderStyle   —  The plot border line style

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:36 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.