set_title( $title, $style = ' ' )

Set the text and style of the title.

Parameters:
title  a string argument. The text of the title.
style  a string. CSS styling of the title.

set_width( $width )

Set the width of the chart.

Parameters:
width  an int argument. The width of the chart frame.

set_height( $height )

Set the height of the chart.

Parameters:
height  an int argument. The height of the chart frame.

set_base( $base = 'js/' )

Set the base path of the swfobject.

Parameters:
base  a string argument. The base path of the swfobject.

set_data( $a )

Set the data for the chart

Parameters:
a  an array argument. An array of the data to add to the chart.

set_tool_tip( $tip )

Set the tooltip to be displayed on each chart item.

Replaceable tokens that can be used in the string include:
#val# - The actual value of whatever the mouse is over.
#key# - The key string.
<br> - New line.

#x_label# - The X label string.
#x_legend# - The X axis legend text.
Default string is: "#x_label#<br>#val#"

Parameters:
tip  a string argument. A formatted string to show as the tooltip.

set_bg_colour( $colour )

Set the background colour.

Parameters:
colour  a string argument. The hex colour value.

set_bg_image( $url, $x = 'center', $y = 'center' )

Set a background image.

Parameters:
url  a string argument. The location of the image.
x  a string argument. The x location of the image. 'Right', 'Left', 'Center'
y  a string argument. The y location of the image. 'Top', 'Bottom', 'Middle'

set_inner_background( $col, $col2 = ' ', $angle = -1 )

Set the background colour of the grid portion of the chart.

Parameters:
col  a string argument. The hex colour value of the background.
col2  a string argument. The hex colour value of the second colour if you want a gradient.
angle  an int argument. The angle in degrees to make the gradient.

set_x_labels( $a )

Set the x axis labels

Parameters:
a  an array argument. An array of the x axis labels.

set_x_label_style( $font_size, $colour = ' ', $orientation = 0, $step = -1, $grid_colour = ' ' )

Set the look and feel of the x axis labels

Parameters:
font_size  an int argument. The font size.
colour  a string argument. The hex colour value.
orientation  an int argument. The orientation of the x-axis text. 0 - Horizontal 1 - Vertical 2 - 45 degrees
step  an int argument. Show the label on every $step label.
grid_colour  a string argument.

set_x_legend( $text, $font_size = -1, $colour = ' ' )

Set the parameters of the x legend.

Parameters:
text  a string argument. The text of the x legend.
font_size  an int argument. The font size of the x legend text.
colour  a string argument The hex value of the font colour.

set_x_tick_size( $size )

Set the size of the x label ticks.

Parameters:
size  an int argument. The size of the ticks in pixels.

set_x_axis_steps( $steps )

Set how often you would like to show a tick on the x axis.

Parameters:
steps  an int argument. Show a tick ever $steps.

set_x_axis_3d( $size )

Set the depth in pixels of the 3D X axis slab.

Parameters:
size  an int argument. The depth in pixels of the 3D X axis.

set_x_axis_colour( $axis, $grid = ' ' )

Set the colour of the x axis line and grid.

Parameters:
axis  a string argument. The hex colour value of the x axis line.
grid  a string argument. The hex colour value of the x axis grid.

attach_to_y_right_axis( $data_number )

Attach a set of data (a line, area or bar chart) to the right Y axis.

Parameters:
data_number  an int argument. The numbered order the data was attached using set_data.

set_y_label_style( $font_size, $colour = ' ' )

Set the look and feel of the y axis labels

Parameters:
font_size  an int argument. The font size.
colour  a string argument. The hex colour value.

set_y_right_label_style( $font_size, $colour = ' ' )

Set the look and feel of the right y axis labels

Parameters:
font_size  an int argument. The font size.
colour  a string argument. The hex colour value.

set_y_max( $max )

Set the maximum value of the y axis.

Parameters:
max  an int argument. The maximum value.

set_y_min( $min )

Set the minimum value of the y axis.

Parameters:
min  an int argument. The minimum value.

set_y_right_max( $max )

Set the maximum value of the right y axis.

Parameters:
max  an int argument. The maximum value.

set_y_right_min( $min )

Set the minimum value of the right y axis.

Parameters:
min  an int argument. The minimum value.

y_label_steps( $val )

Show the y label on every $step label.

Parameters:
val  an int argument. Show the label on every $step label.

set_y_legend( $text, $font_size = -1, $colour = ' ' )

Set the parameters of the y legend.

Parameters:
text  a string argument. The text of the y legend.
font_size  an int argument. The font size of the y legend text.
colour  a string argument The hex colour value of the font colour.

set_y_right_legend( $text, $font_size = -1, $colour = ' ' )

Set the parameters of the right y legend.

Parameters:
text  a string argument. The text of the right y legend.
font_size  an int argument. The font size of the right y legend text.
colour  a string argument The hex value of the font colour.

set_y_axis_colour( $axis, $grid = ' ' )

Set the colour of the y axis line and grid.

Parameters:
axis  a string argument. The hex colour value of the y axis line.
grid  a string argument. The hex colour value of the y axis grid.

set_y_right_axis_colour( $colour )

Set the colour of the right y axis line.

Parameters:
colour  a string argument. The hex colour value of the right y axis line.

line( $width, $colour = ' ', $text = ' ', $font_size = -1, $circles = -1 )

Draw a line without markers on values.

Parameters:
width  an int argument. The width of the line in pixels.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label
circles  an int argument Need to find out.

line_dot( $width, $dot_size, $colour, $text = ' ', $font_size = ' ' )

Draw a line with solid dot markers on values.

Parameters:
width  an int argument. The width of the line in pixels.
dot_size  an int argument. Size in pixels of the dot.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

line_hollow( $width, $dot_size, $colour, $text = ' ', $font_size = ' ' )

Draw a line with hollow dot markers on values.

Parameters:
width  an int argument. The width of the line in pixels.
dot_size  an int argument. Size in pixels of the dot.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

area_hollow( $width, $dot_size, $colour, $alpha, $text = ' ', $font_size = ' ', $fill_colour = ' ' )

Draw an area chart.

Parameters:
width  an int argument. The width of the line in pixels.
dot_size  an int argument. Size in pixels of the dot.
colour  a string argument. The hex colour value of the line.
alpha  an int argument. The percentage of transparency of the fill colour.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.
fill_colour  a string argument. The hex colour value of the fill colour.

bar( $alpha, $colour = ' ', $text = ' ', $font_size = -1 )

Draw a bar chart.

Parameters:
alpha  an int argument. The percentage of transparency of the bar colour.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

bar_filled($alpha, $colour, $colour_outline, $text = ' ', $font_size = -1 )

Draw a bar chart with an outline.

Parameters:
alpha  an int argument. The percentage of transparency of the bar colour.
colour  a string argument. The hex colour value of the line.
colour_outline  a strng argument. The hex colour value of the outline.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

bar_3D($alpha, $colour = ' ', $text = ' ', $font_size = -1 )

Draw a 3D bar chart.

Parameters:
alpha  an int argument. The percentage of transparency of the bar colour.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

bar_glass( $alpha, $colour, $outline_colour, $text = ' ', $font_size = -1 )

Draw a 3D bar chart that looks like glass.

Parameters:
alpha  an int argument. The percentage of transparency of the bar colour.
colour  a string argument. The hex colour value of the line.
outline_colour  a string argument. The hex colour value of the outline.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

bar_fade( $alpha, $colour = ' ', $text = ' ', $font_size = -1 )

Draw a faded bar chart.

Parameters:
alpha  an int argument. The percentage of transparency of the bar colour.
colour  a string argument. The hex colour value of the line.
text  a string argument. The label of the line.
font_size  an int argument. Font size of the label.

pie( $alpha, $line_colour, $label_colour, $gradient = true, $border_size = false )

Draw a pie chart.

Parameters:
alpha  an int argument. The percentage of transparency of the pie colour.
line_colour  a string argument. The hex colour value of the outline.
label_colour  a string argument. The hex colour value of the label.
gradient  a boolean argument. Use a gradient true or false.
border_size  an int argument. Size of the border in pixels.

pie_values( $values, $labels, $links )

Set the values of the pie chart.

Parameters:
values  an array argument. An array of the values for the pie chart.
labels  an array argument. An array of the labels for the pie pieces.
links  an array argument. An array of the links to the pie pieces.

pie_slice_colours( $colours )

Set the pie slice colours.

Parameters:
colours  an array argument. The hex colour values of the pie pieces.

render( $output_type = ' ' )

Render the output.

Parameters:
output_type  a string argument. The type of output to use. none - Use normal output. js - Use Javascript output

Comments

rho_’s picture

The parameters of the functions set_width($width) and set_height($height) can also be passed as a string representing a percentage IE:

<?php 
  my_object->set_width('100%'); 
?>

Small I know but seems unclear in the above article.

-Ryan

jvandervort’s picture

Please note, set_y_label_steps() has been changed to y_label_steps().

-John

-John

okaalto’s picture

Pie function arguments should be:
pie( $alpha, $line_colour, $style = ' ', $gradient = true, $border_size = false )
Third argument is CSS style string, not label colour.

It also seems that pie in OFC v1.9.7 does not tolerate zero values in data, and the chart is incorrectly displayed.

jibla’s picture

area_hollow( $width, $dot_size, $colour, $alpha, $text = ' ', $font_size = ' ', $fill_colour = ' ' )

This is not right definiton!
Method will not work with this order of arguments, it should be:
area_hollow( $width, $dot_size, $alpha, $colour, $text = ' ', $font_size = ' ', $fill_colour = ' ' )
We should change $alpha and $colour arguments.