create_bar_chart (line 325)
Create a bar chart from the specified data and return the SVG markup
string
create_bar_chart
(array $data, [string $x_label = 'X axis'], [string $y_label = 'Y axis'], [string $x_units = ''], [string $y_units = ''])
-
array
$data: The data to be used in the creation of the bar chart
-
string
$x_label: The X axis label
-
string
$y_label: The Y axis label
-
string
$x_units: The X axis units label
-
string
$y_units: The Y axis units label
create_pie_chart (line 496)
Draw a pie chart with the specified data and return the SVG markup
string
create_pie_chart
(array $data)
-
array
$data: The data to be used in the creation of the pie chart
create_scatter_graph (line 401)
Create a scatter graph using the data provided and return the SVG markup
string
create_scatter_graph
(array $data, [string $x_label = 'X Axis'], [string $y_label = 'Y Axis'], [string $x_units = ''], [string $y_units = ''])
-
array
$data: The data to be used in the creation of the scatter graph
-
string
$x_label: The X axis label
-
string
$y_label: The Y axis label
-
string
$x_units: The X axis units label
-
string
$y_units: The Y axis units label
init__svg (line 26)
Standard code module initialisation function.
void
init__svg
()
_draw_average (line 305)
Get the markup for an average line
string
_draw_average
(float $average, float $y_scale)
-
float
$average: Average value
-
float
$y_scale: Y scale
_draw_axes (line 265)
Get the markup for a standard pair of axes
string
_draw_axes
(float $max_y, float $y_scale, [string $x_label = 'X axis'], [string $y_label = 'Y axis'])
-
float
$max_y: Maximum Y value
-
float
$y_scale: Y scale
-
string
$x_label: X axis label
-
string
$y_label: Y axis label
_draw_key (line 82)
Get the SVG markup for a key for a chart, such as a pie chart, using the specified data
string
_draw_key
(array $data, string $start_colour, integer $start_x, integer $start_y, [string $units = ''])
-
array
$data: An array of the data to be keyed up
-
string
$start_colour: The starting colour for the key
-
integer
$start_x: The starting X position
-
integer
$start_y: The starting Y position
-
string
$units: The units (e.g. %)
_draw_segment (line 66)
Get the SVG markup for a segment of a circle. It is designed to be used in the construction of a pie chart
string
_draw_segment
(string $colour, integer $angle, integer $radius, integer $start_x, integer $start_y, integer $end_x, integer $end_y)
-
string
$colour: The hexadecimal-formatted colour for the shape
-
integer
$angle: The angle of the segment
-
integer
$radius: The radius of the segment
-
integer
$start_x: The X position of the start vertex
-
integer
$start_y: The Y position of the start vertex
-
integer
$end_x: The X position of the end vertex
-
integer
$end_y: The Y position of the end vertex
_filter_svg_css (line 213)
Take the SVG and make all the styles inline
string
_filter_svg_css
(string $plot)
_finish_svg (line 202)
Get the markup required to finish an SVG document
string
_finish_svg
([string $plot = ''])
-
string
$plot: The plot markup to insert first
_get_next_colour (line 120)
Get the next hexadecimal colour from the specified one, where each of the Red, Green or Blue columns can either be 00, 33, 66 or 99, to provide a viewable contrast between two adjacent colours
string
_get_next_colour
(string $current_colour)
-
string
$current_colour: The hexadecimal-format colour to be incremented
_start_svg (line 135)
Get the markup required to start a new SVG document
string
_start_svg
()