PHP Class Pop\Graph\Graph

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$adapter mixed Graph graphic adapter interface
$axisColor mixed Axis color
$axisWidth integer Axis width
$barWidth integer Bar width
$fillColor mixed Fill color
$font string Current font to use
$fontColor mixed Font color
$fontSize integer Font size
$fonts array Available fonts
$height integer Graph canvas height
$padding integer Graph canvas padding
$reverseFontColor mixed Reverse font color
$showText boolean Show data text flag
$showX boolean Show X-axis increment lines flag
$showXColor mixed Show X-axis color
$showY boolean Show Y-axis increment lines flag
$showYColor mixed Show X-axis color
$strokeColor mixed Stroke color
$strokeWidth integer Stroke width
$width integer Graph canvas width

Méthodes publiques

Méthode Description
__construct ( array $options, boolean $forceGd = false ) : Graph Constructor
adapter ( ) : mixed Get the graph graphic adapter
addFont ( string $font ) : Graph Add a font to available fonts
createHBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph Create a horizontal bar graph
createLineGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph Create a line graph
createPieChart ( array $pie, array $percents, integer $explode ) : Graph Create a horizontal bar graph
createVBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph Create a vertical bar graph
getAxisColor ( ) : Pop\Color\Space\ColorInterface Get the axis color
getAxisWidth ( ) : integer Get the axis width
getBarWidth ( ) : integer Get the bar width
getFillColor ( ) : mixed Get the fill color
getFont ( ) : string Get the font
getFontColor ( ) : mixed Get the font color
getFontSize ( ) : integer Get the font size
getFonts ( string $font = null ) : string Get the fonts
getHeight ( ) : integer Get the height
getPadding ( ) : integer Get the graph canvas padding
getReverseFontColor ( ) : mixed Get the reverse font color
getShowText ( ) : boolean Get the 'show data text' flag
getShowX ( ) : boolean Get the show X flag
getShowY ( ) : boolean Get the show Y flag
getStrokeColor ( ) : mixed Get the stroke color
getStrokeWidth ( ) : integer Get the stroke width
getWidth ( ) : integer Get the width
getXColor ( ) : Pop\Color\Space\ColorInterface Get the show X color
getYColor ( ) : Pop\Color\Space\ColorInterface Get the show Y color
output ( boolean $download = false ) : void Output the graph
save ( string $to = null, boolean $append = false ) : Graph Save the graph image to disk
setAxisOptions ( Pop\Color\Space\ColorInterface $color = null, integer $width = 2 ) : Graph Set the axis options
setBarWidth ( integer $width ) : Graph Set the bar width
setFillColor ( Pop\Color\Space\ColorInterface $color ) : Graph Set the fill color
setFont ( string $font = null ) : Graph Set the font to use from the available fonts
setFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph Set the font color
setFontSize ( integer $size ) : Graph Set the font size
setPadding ( integer $pad ) : Graph Set the graph canvas padding
setReverseFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph Set the reverse font color
setStrokeColor ( Pop\Color\Space\ColorInterface $color ) : Graph Set the stroke color
setStrokeWidth ( integer $width = 1 ) : Graph Set the stroke width
showText ( boolean $showText ) : Graph Set the 'show data text' flag
showX ( boolean $showX, Pop\Color\Space\ColorInterface $color = null ) : Graph Set the 'show X-axis increment lines' flag
showY ( boolean $showY, Pop\Color\Space\ColorInterface $color = null ) : Graph Set the 'show Y-axis increment lines' flag

Method Details

__construct() public méthode

Instantiate the graph object.
public __construct ( array $options, boolean $forceGd = false ) : Graph
$options array
$forceGd boolean
Résultat Graph

adapter() public méthode

Get the graph graphic adapter
public adapter ( ) : mixed
Résultat mixed

addFont() public méthode

Add a font to available fonts
public addFont ( string $font ) : Graph
$font string
Résultat Graph

createHBarGraph() public méthode

Create a horizontal bar graph
public createHBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Résultat Graph

createLineGraph() public méthode

Create a line graph
public createLineGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Résultat Graph

createPieChart() public méthode

Create a horizontal bar graph
public createPieChart ( array $pie, array $percents, integer $explode ) : Graph
$pie array
$percents array
$explode integer
Résultat Graph

createVBarGraph() public méthode

Create a vertical bar graph
public createVBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Résultat Graph

getAxisColor() public méthode

Get the axis color
public getAxisColor ( ) : Pop\Color\Space\ColorInterface
Résultat Pop\Color\Space\ColorInterface

getAxisWidth() public méthode

Get the axis width
public getAxisWidth ( ) : integer
Résultat integer

getBarWidth() public méthode

Get the bar width
public getBarWidth ( ) : integer
Résultat integer

getFillColor() public méthode

Get the fill color
public getFillColor ( ) : mixed
Résultat mixed

getFont() public méthode

Get the font
public getFont ( ) : string
Résultat string

getFontColor() public méthode

Get the font color
public getFontColor ( ) : mixed
Résultat mixed

getFontSize() public méthode

Get the font size
public getFontSize ( ) : integer
Résultat integer

getFonts() public méthode

Get the fonts
public getFonts ( string $font = null ) : string
$font string
Résultat string

getHeight() public méthode

Get the height
public getHeight ( ) : integer
Résultat integer

getPadding() public méthode

Get the graph canvas padding
public getPadding ( ) : integer
Résultat integer

getReverseFontColor() public méthode

Get the reverse font color
public getReverseFontColor ( ) : mixed
Résultat mixed

getShowText() public méthode

Get the 'show data text' flag
public getShowText ( ) : boolean
Résultat boolean

getShowX() public méthode

Get the show X flag
public getShowX ( ) : boolean
Résultat boolean

getShowY() public méthode

Get the show Y flag
public getShowY ( ) : boolean
Résultat boolean

getStrokeColor() public méthode

Get the stroke color
public getStrokeColor ( ) : mixed
Résultat mixed

getStrokeWidth() public méthode

Get the stroke width
public getStrokeWidth ( ) : integer
Résultat integer

getWidth() public méthode

Get the width
public getWidth ( ) : integer
Résultat integer

getXColor() public méthode

Get the show X color
public getXColor ( ) : Pop\Color\Space\ColorInterface
Résultat Pop\Color\Space\ColorInterface

getYColor() public méthode

Get the show Y color
public getYColor ( ) : Pop\Color\Space\ColorInterface
Résultat Pop\Color\Space\ColorInterface

output() public méthode

Output the graph
public output ( boolean $download = false ) : void
$download boolean
Résultat void

save() public méthode

Save the graph image to disk
public save ( string $to = null, boolean $append = false ) : Graph
$to string
$append boolean
Résultat Graph

setAxisOptions() public méthode

Set the axis options
public setAxisOptions ( Pop\Color\Space\ColorInterface $color = null, integer $width = 2 ) : Graph
$color Pop\Color\Space\ColorInterface
$width integer
Résultat Graph

setBarWidth() public méthode

Set the bar width
public setBarWidth ( integer $width ) : Graph
$width integer
Résultat Graph

setFillColor() public méthode

Set the fill color
public setFillColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Résultat Graph

setFont() public méthode

Set the font to use from the available fonts
public setFont ( string $font = null ) : Graph
$font string
Résultat Graph

setFontColor() public méthode

Set the font color
public setFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Résultat Graph

setFontSize() public méthode

Set the font size
public setFontSize ( integer $size ) : Graph
$size integer
Résultat Graph

setPadding() public méthode

Set the graph canvas padding
public setPadding ( integer $pad ) : Graph
$pad integer
Résultat Graph

setReverseFontColor() public méthode

Set the reverse font color
public setReverseFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Résultat Graph

setStrokeColor() public méthode

Set the stroke color
public setStrokeColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Résultat Graph

setStrokeWidth() public méthode

Set the stroke width
public setStrokeWidth ( integer $width = 1 ) : Graph
$width integer
Résultat Graph

showText() public méthode

Set the 'show data text' flag
public showText ( boolean $showText ) : Graph
$showText boolean
Résultat Graph

showX() public méthode

Set the 'show X-axis increment lines' flag
public showX ( boolean $showX, Pop\Color\Space\ColorInterface $color = null ) : Graph
$showX boolean
$color Pop\Color\Space\ColorInterface
Résultat Graph

showY() public méthode

Set the 'show Y-axis increment lines' flag
public showY ( boolean $showY, Pop\Color\Space\ColorInterface $color = null ) : Graph
$showY boolean
$color Pop\Color\Space\ColorInterface
Résultat Graph

Property Details

$adapter protected_oe property

Graph graphic adapter interface
protected mixed $adapter
Résultat mixed

$axisColor protected_oe property

Axis color
protected mixed $axisColor
Résultat mixed

$axisWidth protected_oe property

Axis width
protected int $axisWidth
Résultat integer

$barWidth protected_oe property

Bar width
protected int $barWidth
Résultat integer

$fillColor protected_oe property

Fill color
protected mixed $fillColor
Résultat mixed

$font protected_oe property

Current font to use
protected string $font
Résultat string

$fontColor protected_oe property

Font color
protected mixed $fontColor
Résultat mixed

$fontSize protected_oe property

Font size
protected int $fontSize
Résultat integer

$fonts protected_oe property

Available fonts
protected array $fonts
Résultat array

$height protected_oe property

Graph canvas height
protected int $height
Résultat integer

$padding protected_oe property

Graph canvas padding
protected int $padding
Résultat integer

$reverseFontColor protected_oe property

Reverse font color
protected mixed $reverseFontColor
Résultat mixed

$showText protected_oe property

Show data text flag
protected bool $showText
Résultat boolean

$showX protected_oe property

Show X-axis increment lines flag
protected bool $showX
Résultat boolean

$showXColor protected_oe property

Show X-axis color
protected mixed $showXColor
Résultat mixed

$showY protected_oe property

Show Y-axis increment lines flag
protected bool $showY
Résultat boolean

$showYColor protected_oe property

Show X-axis color
protected mixed $showYColor
Résultat mixed

$strokeColor protected_oe property

Stroke color
protected mixed $strokeColor
Résultat mixed

$strokeWidth protected_oe property

Stroke width
protected int $strokeWidth
Résultat integer

$width protected_oe property

Graph canvas width
protected int $width
Résultat integer