Property | Type | Description | |
---|---|---|---|
$defs | |||
$force_assoc | |||
$gradients | |||
$javascript | |||
$legend_reverse | |||
$link_base | |||
$link_target | |||
$links | |||
$namespaces | |||
$settings | |||
$values |
Method | Description | |
---|---|---|
DrawGraph ( ) | Draws the selected graph | |
Fetch ( $header = TRUE, $defer_javascript = TRUE ) | Returns the SVG document | |
FetchJavascript ( $onload_immediate = TRUE, $cdata_wrap = TRUE, $no_namespace = TRUE ) | When using the defer_javascript option, this returns the Javascript block | |
InsertComment ( $details ) | Insert a comment into the Javascript section - handy for debugging! | |
InsertVariable ( $var, $value, $more = NULL, $quote = TRUE ) | Adds a Javascript variable - use $value:$more for assoc - use null:$more for array | |
Links ( ) | Sets the links from each item | |
NewID ( ) | Creates a new ID for an element | |
RelativePosition ( $pos, $top, $left, $bottom, $right, $width, $height, $pad, $text = false ) | Returns the [x,y] position that is $pos relative to the top, left, bottom and right. When $text is true, returns [x,y,align right] | |
Render ( $header = TRUE, $content_type = TRUE, $defer_javascript = FALSE ) | Renders the SVG document | |
Settings ( &$settings ) | Sets the options | |
Values ( $values ) | Sets the graph values | |
__construct ( $w, $h, $settings = NULL ) | ||
__get ( $name ) | Retrieves properties from the settings array if they are not already available as properties |
Method | Description | |
---|---|---|
AddEventHandler ( &$array, $evt, $code ) | Adds an inline event handler to an element's array | |
AddFunction ( $name ) | Adds one or more javascript functions | |
AddOverlay ( $from, $to ) | Add an overlaid copy of an element, with opacity of 0 $from and $to are the IDs of the source and destination | |
AssociativeKeys ( ) | Checks if the keys are associative | |
AutoHide ( &$element ) | Makes something auto-hide | |
BackgroundImage ( ) | Displays the background image | |
Canvas ( $id ) | Displays the background | |
CheckValues ( &$values ) | Checks that the data are valid | |
ContrastText ( $x, $y, $text, $fcolour = 'black', $bcolour = 'white', $properties = NULL, $styles = NULL ) | Displays high-contrast text | |
CountLines ( $text ) | Returns the number of lines in a string | |
Draw ( ) | This should be overridden by subclass! | |
DrawLegend ( ) | Draws the legend | |
DrawLegendEntry ( $key, $x, $y, $w, $h ) | Subclasses must draw the entry, if they can | |
DrawTitle ( ) | Draws the graph title, if there is one | |
Element ( $name, $attribs = NULL, $styles = NULL, $content = NULL ) | Draws an element | |
ErrorText ( $error ) | Displays readable (hopefully) error message | |
GetColour ( $key, $no_gradient = FALSE ) | Returns a colour reference | |
GetFirst ( ) | Returns the first non-empty argument | |
GetKey ( $index ) | Returns the key value for an index, if associative | |
GetLink ( $key, $content, $row ) | Retrieves a link | |
GetLinkURL ( $key, $row ) | Returns a link URL or NULL if none | |
GetMaxKey ( ) | Returns the maximum key value | |
GetMaxValue ( ) | Returns the maximum value | |
GetMinKey ( ) | Returns the minimum key value | |
GetMinValue ( ) | Returns the minimum value | |
GetValues ( $row ) | Returns a row of values | |
ParsePosition ( $pos, $w, $h, $pad ) | Parses a position string, returning x and y coordinates | |
SetDraggable ( &$element ) | Makes an item draggable | |
SetFader ( &$element, $in, $out, $target = NULL, $duplicate = FALSE ) | Sets the fader for an element | |
SetStroke ( &$attr, $line_join = null ) | Sets the stroke options for an element | |
SetTooltip ( &$element, $key, $value = NULL, $duplicate = FALSE ) | Default tooltip contents are key and value, or whatever $key is if $value is not set | |
Text ( $text, $line_spacing, $attribs, $styles = NULL ) | Returns a text element, with tspans for subsequent lines | |
TextFit ( $text, $x, $y, $w, $h, $attribs = NULL, $styles = NULL ) | Fits text to a box - text will be bottom-aligned | |
TextLines ( $text, $x, $line_spacing ) | Formats lines of text | |
TextSize ( $text, $font_size, $font_adjust, $angle, $line_spacing ) | Returns [width,height] of text $text = string OR text length | |
TooltipText ( $key, $value = NULL ) | Sets the text to use for a tooltip |
Method | Description | |
---|---|---|
LoadJavascript ( ) | Loads the Javascript class | |
MakeLinearGradient ( $id, $colours ) | Creates a linear gradient element |
protected AddEventHandler ( &$array, $evt, $code ) |
protected AddFunction ( $name ) |
protected AddOverlay ( $from, $to ) |
protected ContrastText ( $x, $y, $text, $fcolour = 'black', $bcolour = 'white', $properties = NULL, $styles = NULL ) |
protected static CountLines ( $text ) |
protected DrawLegendEntry ( $key, $x, $y, $w, $h ) |
protected Element ( $name, $attribs = NULL, $styles = NULL, $content = NULL ) |
protected ErrorText ( $error ) |
public Fetch ( $header = TRUE, $defer_javascript = TRUE ) |
public FetchJavascript ( $onload_immediate = TRUE, $cdata_wrap = TRUE, $no_namespace = TRUE ) |
protected GetColour ( $key, $no_gradient = FALSE ) |
protected static GetFirst ( ) |
protected GetKey ( $index ) |
protected GetLinkURL ( $key, $row ) |
public InsertComment ( $details ) |
public InsertVariable ( $var, $value, $more = NULL, $quote = TRUE ) |
protected ParsePosition ( $pos, $w, $h, $pad ) |
public static RelativePosition ( $pos, $top, $left, $bottom, $right, $width, $height, $pad, $text = false ) |
public Render ( $header = TRUE, $content_type = TRUE, $defer_javascript = FALSE ) |
protected SetFader ( &$element, $in, $out, $target = NULL, $duplicate = FALSE ) |
protected SetStroke ( &$attr, $line_join = null ) |
protected SetTooltip ( &$element, $key, $value = NULL, $duplicate = FALSE ) |
protected Text ( $text, $line_spacing, $attribs, $styles = NULL ) |
protected TextFit ( $text, $x, $y, $w, $h, $attribs = NULL, $styles = NULL ) |
protected TextSize ( $text, $font_size, $font_adjust, $angle, $line_spacing ) |
protected TooltipText ( $key, $value = NULL ) |
public __get ( $name ) |