Copyright(C) 2005 Cafen.net All right reserved. Contact HP (010-9761-4025) / email(outmind@nate.com)
Commercial Use keep this Logo in Your site with Link | Open Flash Chart


OFC2 Doc
OFC2 Home
OFC2JS Home
Tag Sample

renderElementsByClassName

renderElementsById

renderElement

renderElements

cafenOFC2JS
Constructor
Constructor Description
cafenOFC2JS() chart render Object
Methods
Method Return Value Description
render(obj,...) void obj : textarea id or object
renderElement(obj,...) void alias of render
renderElementsByClassName(className) void render by class name
renderElementsById(id) void render by id
renderElementsByName(name) void render by name

cafen.ofc2js
Constructor
Constructor Description
none Static
Methods
Method Return Value Description
load(id) String get Json String
get(id) Object get Json Object
set(id, jsonObject) void set Json Object to id

Attribute of Table to Render
Tag Key Type Description
Table width int the width of chart
" height int the height of chart
" title String the title of chart
" title_style String the style of title
" x_legend String the legend of x axis
" y_legend String the legend of y axis
" legend_style String the style of x y legend
" x_legend_style String the style of x legend
" y_legend_style String the style of y legend
TR [type : shape, shape_arrow ,...] type String [shape, shape_arrow ..]
" colour string color of shape
" x float the center x point of shape
" y float the center y point of shape
" x1, x2, x3, x4,y1, y2, y3, y4 float ref point
" xyrate float the rate of xy axis
" rate int the number of point to render in case arrow, curve
" start boolean not sure
" r float r
" d float d
" a int the number of angle
" sa int the angle of pie start
" ea int the angle of pie end
" stroke float weight of Shape
" ribbon boolean use ribbon type curve
" arrow boolean add arrow to end of curve
TR [type : xy_axis, x_axis, y_axis, y_axis_right, etc] type String [xy_axis, x_axis ..]
" stroke int the weight value of axis
" colour int the color of axis
" colour int the color of axis
" 3d int the depth of x axis
" min float the min value of axis
" max float the max value of axis
" step float the step value of axis
" grid_colour string the color of gridline
" rotate int the angle of axis label
" size int the font size of axis label
" offset boolean use offset or not
" autolabel boolean use auto lebel
" font_colour string the color of lebel
TR [type : line, bar etc] type String [line, bar ..]
" type String [line, bar ..]
" pointer string star,dot,bow ..
" pointercolour string color of dot
" pointersize int size of dot
" pointerrotate int rotate angle of dot
" pointerclick string on click event of dot
" line string line style [dotted|solid|dashed|dot|longdash]
" text string Label name
" font_size,size string Label size
" stroke string Line weight
" colour string Color Line or Bar
" fill_colour string Color of Fill Area
" outline_colour string Color of Out Line
" alpha Float Alpha value of line or bar
" fun_factor int fun factor of sketch bar
" fill_alpha float the alpha value of fill area
" on_show string on show event
line - [pop-up|explode|mid-slide|drop|fade-in|shrink-in]
bar - [pop-up|drop|fade-in|grow-up|grow-down|pop]
" cascade int on show envent cascade value
" delay int on show envent delay value
" tooltip String the Tooltop of line of bar
" gradient_fill Boolean use gradient fill for pie chart
" animate String use animate for pie chart, fade or number join by ,
" loop Boolean set the Line to loop
TD (type line, bar) innerHTML float the value of chart
TD (type pie) innerHTML String value, lebel, color
TD (type candle) innerHTML String low, close, open, high
TD (type scatter_line,scatter) innerHTML String x, y, dot size
TR (type menu) colour String bg color of menu
" outline_colour String outline color of menu
TD (type menu) innerHTML String menu text
" type String type of menu [camera, ..]
" on_click String the script name of on click

cafen.ofc2js.open_flash_chart
Constructor
Constructor Description
cafen.ofc2js.open_flash_chart make a flash chart
added Methods
Name Return Value Description
addObject(object) void | object
add Object to chart
object = {
	type : 'line |  line_dot |  line_hollow |  bar |  bar_filled |  ...' ,
	args : [ Constructor arguments ...], 
	callFnc : [
		{
			cmd : 'method name ...',
			args : [ the arguments of call the method]
		}
	]
}
render([string|object] id, object options ) self render chart to id
show(boolean bl) self show the chart , if bl is true the chart will be re-rendered
reload() self re-render the chart
saveImage(string filename) string img url save the chart as png image on server
getImage() string get the image url of chart
getJson(boolean bl) string|object get the json Object as string or just object
hide() void hide the chart

cafen.ofc2js.[hollow_dot|star|bow|anchor|dot|solid_dot]
Constructor
Constructor Description
cafen.ofc2js.[dot_type](dot_value value, object options) make a dot type
the Options Object of Constructor Arguments
Name Type Description
size int Dot size
colour String Color of dot
on_click String The function name of dot on clieck event
rotate Int Dot rotate angle in case of dot type bow or anchor
tooltip String Tooltip string of dot , can use #val# #x_label# etc
Methods
Name Return Value Description
value(dot_value value) void setup the value of dot and color
position(int x, int y) void set the position of dot
colour(string colour) self set the color of dot
tooltip(string tip) self set the tip of dot
size(int size) self set the size of dot in pixel
halo_size(int size) self set the size of halo dot in pixel
on_click(string event) void the event of dot on click
rotation(int angle) self the angle of dot rotate in case of bow

cafen.ofc2js.[area|area_hollow|area_line]
Constructor
Constructor Description
cafen.ofc2js.[area_type](object options) make a area type chart
the Options Object of Constructor Arguments
Name Type Description
.. extend to line_base . refer to line_base options
fill_colour String the Color of area fill
fill_alpha Float the alpha value of area fill
Methods
Name Return Value Description
.. extend to line_base . refer to line_base method
set_fill_colour(string colour) void set the fill color
fill_colour(string colour) self alias of set_fill_colour
set_fill_alpha(float alpha) void set the alpha value of fill color
set_loop void set the area line to loop type