JavaScript Graph Builder
Quick Reference Sheet

method Explanation arguments
Graph() Graph object constructor. width,
height
addRow() Used to add data y-values to the graph. y-val1,
y-val2,
...
showXScale() Used to create a generic X-axis scale. start-val
setTime() Used to create a time-type X-axis scale. hour,
min,
pm?
setDate() Used to create a date-type X-axis scale. month,
day,
year
build() Builds the graph.  
setLegend() Used to add a legend to the Graph. leg-name1,
leg-name2,
...

property Explanation type
stacked True means build stacked-type graph. boolean
relative True means build stacked-type relative-area graph. boolean
longDate True means use long date format (i.e., 2-Jan instead of 1/2). boolean
showYear True means show the year along with the date. boolean
showDay True means show the day of the week along with the date. boolean
inc X-axis scale increment (could be days or minutes depending on the scale type) integer
scale Y-axis scale increment integer
skip Indicates the number of ticks between ticks with labels. (E.g., 2 would put labels on every other tick.) This should be used if the X-axis tick label won't fit because the ticks are too close together. integer
offset Indicates the Y-offset of the X-axis (the "X-intercept"). Only use on graphs with only positive (or only negative) values. integer
title Title of the graph string
yLabel Y-Label of the graph string
xLabel X-Label of the graph string
bgColor Assigns a background color to the graph. Default (null) is a transparent graph. hexadecimal

For the latest technical information on Sun-Netscape Alliance products, go to: http://developer.iplanet.com

For more Internet development resources, try Netscape TechSearch.


Copyright © 1999 Netscape Communications Corporation.
This site powered by: Netscape Enterprise Server and Netscape Compass Server.