PHP Класс GridGraph, GotCms

Наследование: extends Graph
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$axes_calc_done
$bar_unit_width
$flip_axes Set to true for horizontal graphs
$g_height
$g_width
$guidelines
$label_adjust_done
$label_centre Set to true for block-based labelling
$max_guide
$min_guide
$sub_x
$sub_y
$uneven_x
$uneven_y
$x0
$x_points
$y0
$y_points

Защищенные методы

Метод Описание
Axes ( ) Draws bar or line graph axes
BuildGuideline ( &$line, &$lines, &$text, &$path, &$d ) Adds a single guideline and its title to content
CalcAxes ( ) Calculates the effect of axes, applying to padding
CalcGrid ( ) Calculates the position of grid lines
CalcGuidelines ( $g = null ) Converts guideline options to more useful member variables
ClampHorizontal ( $val )
ClampVertical ( $val ) clamps a value to the grid boundaries
ClipGrid ( &$attr ) Returns a clipping path for the grid
DOverlap ( $style, $size ) Calculates the overlap of a division or subdivision
DivisionOverlap ( ) Returns the amount of overlap the divisions and subdivisions use
DivisionsPositions ( $style, $style_default, $size, $size_default, $fullsize, $start, $axis_offset ) Returns the position and size of divisions
FindLongestAxisLabel ( $length_x, $length_y ) Determines the longest axis labels for the given axis lengths
FindSubdiv ( $grid_div, $u, $min, $min_unit, $fixed ) Find the subdivision size
GetAxes ( $ends, &$x_len, &$y_len ) Returns the X and Y axis class instances as a list
GetAxisEnds ( ) Returns an array containing the value and key axis min and max
GetGridPoints ( $length, $spacing, $start, $direction, $zero, $unit_size, $uneven ) Returns the grid points as an associative array: array($value => $position)
GetGridSubdivisions ( &$points, $spacing, $direction ) Returns the grid subdivision points as an array
GetHorizontalCount ( ) Subclasses can override this for non-linear graphs
GetLongestKey ( ) Returns the key that takes up the most space
Grid ( ) Draws the grid behind the bar / line graph
GridLines ( $path, $colour, $dash, $fill = null ) Returns a set of gridlines
GridPosition ( $key, $ikey ) Returns the grid position for a bar or point, or NULL if not on grid $key = actual value array index $ikey = integer position in array
GuidelinePath ( $axis, $value, $depth, &$x, &$y, &$w, &$h ) Creates the path data for a guideline and sets the dimensions
Guidelines ( $depth ) Returns the elements to draw the guidelines
HLabel ( &$attribs ) Returns the horizontal axis label
LabelAdjustment ( $longest_v = 1000, $longest_h = 100 ) Modifies the graph padding to allow room for labels
Labels ( $axis_text = '' ) Returns the labels grouped with the provided axis division labels
NumString ( $n ) Converts number to string
SetGridDimensions ( ) Sets up grid width and height to fill padded area
UpdateAndUnset ( &$var, &$array, $key ) Updates $var with $array[$key] and removes it from array
VLabel ( &$attribs ) Returns the vertical axis label
XAxis ( $yoff ) Returns the X axis SVG fragment
XAxisDivisions ( &$points, $style, $style_default, $size, $size_default, $yoff ) Returns X-axis divisions as a path
XAxisText ( &$points, $xoff, $yoff, $angle ) Returns the X-axis text fragment
YAxis ( $xoff ) Returns the Y axis SVG fragment
YAxisDivisions ( &$points, $style, $style_default, $size, $size_default, $xoff ) Returns Y-axis divisions as a path
YAxisText ( &$points, $xoff, $yoff, $angle ) Returns the Y-axis text fragment

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

Axes() защищенный Метод

Draws bar or line graph axes
protected Axes ( )

BuildGuideline() защищенный Метод

Adds a single guideline and its title to content
protected BuildGuideline ( &$line, &$lines, &$text, &$path, &$d )

CalcAxes() защищенный Метод

Calculates the effect of axes, applying to padding
protected CalcAxes ( )

CalcGrid() защищенный Метод

Calculates the position of grid lines
protected CalcGrid ( )

CalcGuidelines() защищенный Метод

Converts guideline options to more useful member variables
protected CalcGuidelines ( $g = null )

ClampHorizontal() защищенный Метод

protected ClampHorizontal ( $val )

ClampVertical() защищенный Метод

clamps a value to the grid boundaries
protected ClampVertical ( $val )

ClipGrid() защищенный Метод

Returns a clipping path for the grid
protected ClipGrid ( &$attr )

DOverlap() защищенный Метод

Calculates the overlap of a division or subdivision
protected DOverlap ( $style, $size )

DivisionOverlap() защищенный Метод

Returns the amount of overlap the divisions and subdivisions use
protected DivisionOverlap ( )

DivisionsPositions() защищенный Метод

Returns the position and size of divisions
protected DivisionsPositions ( $style, $style_default, $size, $size_default, $fullsize, $start, $axis_offset )

FindLongestAxisLabel() защищенный Метод

Determines the longest axis labels for the given axis lengths
protected FindLongestAxisLabel ( $length_x, $length_y )

FindSubdiv() защищенный Метод

Find the subdivision size
protected FindSubdiv ( $grid_div, $u, $min, $min_unit, $fixed )

GetAxes() защищенный Метод

Returns the X and Y axis class instances as a list
protected GetAxes ( $ends, &$x_len, &$y_len )

GetAxisEnds() защищенный Метод

Returns an array containing the value and key axis min and max
protected GetAxisEnds ( )

GetGridPoints() защищенный Метод

Returns the grid points as an associative array: array($value => $position)
protected GetGridPoints ( $length, $spacing, $start, $direction, $zero, $unit_size, $uneven )

GetGridSubdivisions() защищенный Метод

Returns the grid subdivision points as an array
protected GetGridSubdivisions ( &$points, $spacing, $direction )

GetHorizontalCount() защищенный Метод

Subclasses can override this for non-linear graphs
protected GetHorizontalCount ( )

GetLongestKey() защищенный Метод

Returns the key that takes up the most space
protected GetLongestKey ( )

Grid() защищенный Метод

Draws the grid behind the bar / line graph
protected Grid ( )

GridLines() защищенный Метод

Returns a set of gridlines
protected GridLines ( $path, $colour, $dash, $fill = null )

GridPosition() защищенный Метод

Returns the grid position for a bar or point, or NULL if not on grid $key = actual value array index $ikey = integer position in array
protected GridPosition ( $key, $ikey )

GuidelinePath() защищенный Метод

Creates the path data for a guideline and sets the dimensions
protected GuidelinePath ( $axis, $value, $depth, &$x, &$y, &$w, &$h )

Guidelines() защищенный Метод

Returns the elements to draw the guidelines
protected Guidelines ( $depth )

HLabel() защищенный Метод

Returns the horizontal axis label
protected HLabel ( &$attribs )

LabelAdjustment() защищенный Метод

Modifies the graph padding to allow room for labels
protected LabelAdjustment ( $longest_v = 1000, $longest_h = 100 )

Labels() защищенный Метод

Returns the labels grouped with the provided axis division labels
protected Labels ( $axis_text = '' )

NumString() защищенный Метод

Converts number to string
protected NumString ( $n )

SetGridDimensions() защищенный Метод

Sets up grid width and height to fill padded area
protected SetGridDimensions ( )

UpdateAndUnset() защищенный Метод

Updates $var with $array[$key] and removes it from array
protected UpdateAndUnset ( &$var, &$array, $key )

VLabel() защищенный Метод

Returns the vertical axis label
protected VLabel ( &$attribs )

XAxis() защищенный Метод

Returns the X axis SVG fragment
protected XAxis ( $yoff )

XAxisDivisions() защищенный Метод

Returns X-axis divisions as a path
protected XAxisDivisions ( &$points, $style, $style_default, $size, $size_default, $yoff )

XAxisText() защищенный Метод

Returns the X-axis text fragment
protected XAxisText ( &$points, $xoff, $yoff, $angle )

YAxis() защищенный Метод

Returns the Y axis SVG fragment
protected YAxis ( $xoff )

YAxisDivisions() защищенный Метод

Returns Y-axis divisions as a path
protected YAxisDivisions ( &$points, $style, $style_default, $size, $size_default, $xoff )

YAxisText() защищенный Метод

Returns the Y-axis text fragment
protected YAxisText ( &$points, $xoff, $yoff, $angle )

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

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

protected $axes_calc_done

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

protected $bar_unit_width

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

Set to true for horizontal graphs
protected $flip_axes

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

protected $g_height

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

protected $g_width

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

protected $guidelines

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

protected $label_adjust_done

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

Set to true for block-based labelling
protected $label_centre

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

protected $max_guide

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

protected $min_guide

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

protected $sub_x

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

protected $sub_y

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

protected $uneven_x

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

protected $uneven_y

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

protected $x0

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

protected $x_points

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

protected $y0

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

protected $y_points