PHP Class Pop\Graph\Graph\AbstractGraph

Author: Nick Sagona, III ([email protected])
Show file Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$graph Pop\Graph\Graph Show X-axis color

Public Methods

Method Description
__construct ( Graph $graph ) : AbstractGraph Constructor

Protected Methods

Method Description
drawDataText ( array $dataPoints, array $xAxis, array $yAxis, string $type, array $points = null, integer $skip = 1 ) : void Draw the data point text on the graph
drawXAxis ( array $xAxis, ArrayObject $points, integer $offset ) : void Draw the X Axis
drawYAxis ( array $yAxis, ArrayObject $points, integer $offset ) : void Draw the Y Axis
getPoints ( array $xAxis, array $yAxis ) : ArrayObject Get points
getQuadrant ( array $point, array $center ) : integer Method to calculate which quadrant a point is in.
getTriangle ( array $point, array $center, integer $quad ) : array Method to calculate the points and data of a triangle.
showXAxis ( array $xAxis, ArrayObject $points, integer $offset ) : void Draw the X Axis increments
showYAxis ( array $yAxis, ArrayObject $points, integer $offset ) : void Draw the Y Axis increments

Method Details

__construct() public method

Instantiate the graph adapter object.
public __construct ( Graph $graph ) : AbstractGraph
$graph Pop\Graph\Graph
return AbstractGraph

drawDataText() protected method

Draw the data point text on the graph
protected drawDataText ( array $dataPoints, array $xAxis, array $yAxis, string $type, array $points = null, integer $skip = 1 ) : void
$dataPoints array
$xAxis array
$yAxis array
$type string
$points array
$skip integer
return void

drawXAxis() protected method

Draw the X Axis
protected drawXAxis ( array $xAxis, ArrayObject $points, integer $offset ) : void
$xAxis array
$points ArrayObject
$offset integer
return void

drawYAxis() protected method

Draw the Y Axis
protected drawYAxis ( array $yAxis, ArrayObject $points, integer $offset ) : void
$yAxis array
$points ArrayObject
$offset integer
return void

getPoints() protected method

Get points
protected getPoints ( array $xAxis, array $yAxis ) : ArrayObject
$xAxis array
$yAxis array
return ArrayObject

getQuadrant() protected method

Method to calculate which quadrant a point is in.
protected getQuadrant ( array $point, array $center ) : integer
$point array
$center array
return integer

getTriangle() protected method

Method to calculate the points and data of a triangle.
protected getTriangle ( array $point, array $center, integer $quad ) : array
$point array
$center array
$quad integer
return array

showXAxis() protected method

Draw the X Axis increments
protected showXAxis ( array $xAxis, ArrayObject $points, integer $offset ) : void
$xAxis array
$points ArrayObject
$offset integer
return void

showYAxis() protected method

Draw the Y Axis increments
protected showYAxis ( array $yAxis, ArrayObject $points, integer $offset ) : void
$yAxis array
$points ArrayObject
$offset integer
return void

Property Details

$graph protected property

Show X-axis color
protected Graph,Pop\Graph $graph
return Pop\Graph\Graph