[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Image/Graph/ -> Plotarea.php (sommaire)

Image_Graph - PEAR PHP OO Graph Rendering Utility. PHP versions 4 and 5

Author: Jesper Veggerby <pear.nosey@veggerby.dk>
Copyright: Copyright (C) 2003, 2004 Jesper Veggerby Hansen
License: http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
Version: CVS: $Id: Plotarea.php,v 1.23 2006/02/28 22:48:07 nosey Exp $
Poids: 1145 lignes (40 kb)
Inclus ou requis: 2 fois
Référencé: 0 fois
Nécessite: 2 fichiers
 Image/Graph.php
 Image/Graph/Layout.php

Définit 1 class

Image_Graph_Plotarea:: (24 méthodes):
  Image_Graph_Plotarea()
  _setParent()
  setPlotBorderStyle()
  add()
  _plotWidth()
  _plotHeight()
  _setExtrema()
  _fillLeft()
  _fillTop()
  _fillRight()
  _fillBottom()
  _axisPointX()
  _axisPointY()
  _pointX()
  _pointY()
  _getMinimum()
  _getMaximum()
  _labelDistance()
  hideAxis()
  clearAxis()
  getAxis()
  _updateCoords()
  setAxisPadding()
  _done()


Classe: Image_Graph_Plotarea  - X-Ref

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

Image_Graph_Plotarea($axisX = 'Image_Graph_Axis_Category', $axisY = 'Image_Graph_Axis', $direction = 'vertical')   X-Ref
Image_Graph_Plotarea [Constructor]

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

_setParent(& $parent)   X-Ref
Sets the parent. The parent chain should ultimately be a GraPHP object

param: Image_Graph_Common $parent The parent

setPlotBorderStyle(& $plotBorderStyle)   X-Ref
Sets the plot border line style of the element.

param: Image_Graph_Line $lineStyle The line style of the border

add(& $element, $axis = IMAGE_GRAPH_AXIS_Y)   X-Ref
Adds an element to the plotarea

param: Image_Graph_Element $element The element to add
param: int $axis The axis to associate the element with, either
return: Image_Graph_Element The added element

_plotWidth()   X-Ref
Get the width of the 'real' plotarea

return: int The width of the 'real' plotarea, ie not including space occupied by padding and axis

_plotHeight()   X-Ref
Get the height of the 'real' plotarea

return: int The height of the 'real' plotarea, ie not including space

_setExtrema(& $plot)   X-Ref
Set the extrema of the axis

param: Image_Graph_Plot $plot The plot that 'hold' the values

_fillLeft()   X-Ref
Left boundary of the background fill area

return: int Leftmost position on the canvas

_fillTop()   X-Ref
Top boundary of the background fill area

return: int Topmost position on the canvas

_fillRight()   X-Ref
Right boundary of the background fill area

return: int Rightmost position on the canvas

_fillBottom()   X-Ref
Bottom boundary of the background fill area

return: int Bottommost position on the canvas

_axisPointX($value, $min, $max)   X-Ref
Get the point from the x-axis

param: array $value The value array
param: int $min The minimum pixel position possible
param: int $max The maximum pixel position possible
return: int The pixel position from the axis

_axisPointY($value, $min, $max)   X-Ref
Get the point from the x-axis

param: array $value The value array
param: int $min The minimum pixel position possible
param: int $max The maximum pixel position possible
return: int The pixel position from the axis

_pointX($value)   X-Ref
Get the X pixel position represented by a value

param: double Value the value to get the pixel-point for
return: double The pixel position along the axis

_pointY($value)   X-Ref
Get the Y pixel position represented by a value

param: double Value the value to get the pixel-point for
return: double The pixel position along the axis

_getMinimum($axis = IMAGE_GRAPH_AXIS_Y)   X-Ref
Return the minimum value of the specified axis

param: int $axis The axis to return the minimum value of (see {$link
return: double The minimum value of the axis

_getMaximum($axis = IMAGE_GRAPH_AXIS_Y)   X-Ref
Return the maximum value of the specified axis

param: int $axis The axis to return the maximum value of(see {$link
return: double The maximum value of the axis

_labelDistance($axis)   X-Ref
Return the label distance for the specified axis.

param: int $axis The axis to return the label distance for
return: int The distance between 2 adjacent labels

hideAxis($axis = false)   X-Ref
Hides the axis


clearAxis()   X-Ref
Clears/removes the axis


getAxis($axis = IMAGE_GRAPH_AXIS_X)   X-Ref
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'

param: int $axis The axis to return
return: Image_Graph_Axis The axis

_updateCoords()   X-Ref
Update coordinates


setAxisPadding($value, $position = false)   X-Ref
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.

param: mixed $value The value/padding
param: mixed $position The "position" of the padding

_done()   X-Ref
Output the plotarea to the canvas

return: bool Was the output 'good' (true) or 'bad' (false).



Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7