PHP Класс Pop\Graph\Graph

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

Instantiate the graph object.
public __construct ( array $options, boolean $forceGd = false ) : Graph
$options array
$forceGd boolean
Результат Graph

adapter() публичный Метод

Get the graph graphic adapter
public adapter ( ) : mixed
Результат mixed

addFont() публичный Метод

Add a font to available fonts
public addFont ( string $font ) : Graph
$font string
Результат Graph

createHBarGraph() публичный Метод

Create a horizontal bar graph
public createHBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Результат Graph

createLineGraph() публичный Метод

Create a line graph
public createLineGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Результат Graph

createPieChart() публичный Метод

Create a horizontal bar graph
public createPieChart ( array $pie, array $percents, integer $explode ) : Graph
$pie array
$percents array
$explode integer
Результат Graph

createVBarGraph() публичный Метод

Create a vertical bar graph
public createVBarGraph ( array $dataPoints, array $xAxis, array $yAxis ) : Graph
$dataPoints array
$xAxis array
$yAxis array
Результат Graph

getAxisColor() публичный Метод

Get the axis color
public getAxisColor ( ) : Pop\Color\Space\ColorInterface
Результат Pop\Color\Space\ColorInterface

getAxisWidth() публичный Метод

Get the axis width
public getAxisWidth ( ) : integer
Результат integer

getBarWidth() публичный Метод

Get the bar width
public getBarWidth ( ) : integer
Результат integer

getFillColor() публичный Метод

Get the fill color
public getFillColor ( ) : mixed
Результат mixed

getFont() публичный Метод

Get the font
public getFont ( ) : string
Результат string

getFontColor() публичный Метод

Get the font color
public getFontColor ( ) : mixed
Результат mixed

getFontSize() публичный Метод

Get the font size
public getFontSize ( ) : integer
Результат integer

getFonts() публичный Метод

Get the fonts
public getFonts ( string $font = null ) : string
$font string
Результат string

getHeight() публичный Метод

Get the height
public getHeight ( ) : integer
Результат integer

getPadding() публичный Метод

Get the graph canvas padding
public getPadding ( ) : integer
Результат integer

getReverseFontColor() публичный Метод

Get the reverse font color
public getReverseFontColor ( ) : mixed
Результат mixed

getShowText() публичный Метод

Get the 'show data text' flag
public getShowText ( ) : boolean
Результат boolean

getShowX() публичный Метод

Get the show X flag
public getShowX ( ) : boolean
Результат boolean

getShowY() публичный Метод

Get the show Y flag
public getShowY ( ) : boolean
Результат boolean

getStrokeColor() публичный Метод

Get the stroke color
public getStrokeColor ( ) : mixed
Результат mixed

getStrokeWidth() публичный Метод

Get the stroke width
public getStrokeWidth ( ) : integer
Результат integer

getWidth() публичный Метод

Get the width
public getWidth ( ) : integer
Результат integer

getXColor() публичный Метод

Get the show X color
public getXColor ( ) : Pop\Color\Space\ColorInterface
Результат Pop\Color\Space\ColorInterface

getYColor() публичный Метод

Get the show Y color
public getYColor ( ) : Pop\Color\Space\ColorInterface
Результат Pop\Color\Space\ColorInterface

output() публичный Метод

Output the graph
public output ( boolean $download = false ) : void
$download boolean
Результат void

save() публичный Метод

Save the graph image to disk
public save ( string $to = null, boolean $append = false ) : Graph
$to string
$append boolean
Результат Graph

setAxisOptions() публичный Метод

Set the axis options
public setAxisOptions ( Pop\Color\Space\ColorInterface $color = null, integer $width = 2 ) : Graph
$color Pop\Color\Space\ColorInterface
$width integer
Результат Graph

setBarWidth() публичный Метод

Set the bar width
public setBarWidth ( integer $width ) : Graph
$width integer
Результат Graph

setFillColor() публичный Метод

Set the fill color
public setFillColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Результат Graph

setFont() публичный Метод

Set the font to use from the available fonts
public setFont ( string $font = null ) : Graph
$font string
Результат Graph

setFontColor() публичный Метод

Set the font color
public setFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Результат Graph

setFontSize() публичный Метод

Set the font size
public setFontSize ( integer $size ) : Graph
$size integer
Результат Graph

setPadding() публичный Метод

Set the graph canvas padding
public setPadding ( integer $pad ) : Graph
$pad integer
Результат Graph

setReverseFontColor() публичный Метод

Set the reverse font color
public setReverseFontColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Результат Graph

setStrokeColor() публичный Метод

Set the stroke color
public setStrokeColor ( Pop\Color\Space\ColorInterface $color ) : Graph
$color Pop\Color\Space\ColorInterface
Результат Graph

setStrokeWidth() публичный Метод

Set the stroke width
public setStrokeWidth ( integer $width = 1 ) : Graph
$width integer
Результат Graph

showText() публичный Метод

Set the 'show data text' flag
public showText ( boolean $showText ) : Graph
$showText boolean
Результат Graph

showX() публичный Метод

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
Результат Graph

showY() публичный Метод

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
Результат Graph

Описание свойств

$adapter защищенное свойство

Graph graphic adapter interface
protected mixed $adapter
Результат mixed

$axisColor защищенное свойство

Axis color
protected mixed $axisColor
Результат mixed

$axisWidth защищенное свойство

Axis width
protected int $axisWidth
Результат integer

$barWidth защищенное свойство

Bar width
protected int $barWidth
Результат integer

$fillColor защищенное свойство

Fill color
protected mixed $fillColor
Результат mixed

$font защищенное свойство

Current font to use
protected string $font
Результат string

$fontColor защищенное свойство

Font color
protected mixed $fontColor
Результат mixed

$fontSize защищенное свойство

Font size
protected int $fontSize
Результат integer

$fonts защищенное свойство

Available fonts
protected array $fonts
Результат array

$height защищенное свойство

Graph canvas height
protected int $height
Результат integer

$padding защищенное свойство

Graph canvas padding
protected int $padding
Результат integer

$reverseFontColor защищенное свойство

Reverse font color
protected mixed $reverseFontColor
Результат mixed

$showText защищенное свойство

Show data text flag
protected bool $showText
Результат boolean

$showX защищенное свойство

Show X-axis increment lines flag
protected bool $showX
Результат boolean

$showXColor защищенное свойство

Show X-axis color
protected mixed $showXColor
Результат mixed

$showY защищенное свойство

Show Y-axis increment lines flag
protected bool $showY
Результат boolean

$showYColor защищенное свойство

Show X-axis color
protected mixed $showYColor
Результат mixed

$strokeColor защищенное свойство

Stroke color
protected mixed $strokeColor
Результат mixed

$strokeWidth защищенное свойство

Stroke width
protected int $strokeWidth
Результат integer

$width защищенное свойство

Graph canvas width
protected int $width
Результат integer