Class Graph

Object
   |
   +--Graph

class Graph

Defined in graph.js

Version: 1.1

Author: Mathieu HENRI, Opera Software ASA


Field Summary
 String bgColor
          the background limit colors ( '#ffcc99' by default )
<private>  Array dataSets
          
 String fgColor
          the foreground limit colors ( '#336600' by default )
 String height
          the height of the graphs ( '360px' by default )
<private>  Array labels
          
<private>  String rendererMethodPrefix
          'renderer_' use this prefix to name the renderer methods you add to the prototype
 String title
          'untitled Graph'
 String width
          the width of the graphs ( '480px' by default )
 
Constructor Summary
Graph ()
            Graph class.
 
Method Summary
 Boolean addDataSet( <String> _dataId, <Array> _dataSet, <String> _color )
           adds a set of data.
 Object getDataRange()
           get the min/max range of the dataSets.
 String getDataSetColor( <Number> index )
           get the color of a given dataSet or a stable pseudo random color in the [ bgColor ; fgColor ] range.
 Array getDataSets()
           get the labels.
 Array getLabels()
           get the labels.
 <private>  Boolean isArray( what )
           check if a variable is an Array.
 Array listStyles()
           list the renderers.
 Boolean render( <String> _style, <HTMLElement> _renderTarget )
           render the graph
 Boolean renderer_accumulatedLines( svg )
           'accumulatedLines' graph renderer
 Boolean renderer_bars( svg )
           'bars' graph renderer
 Boolean renderer_lines( svg )
           'lines' graph renderer
 Boolean renderer_pie( svg )
           'pie' graph renderer
 <private>  void reset()
           reset the graph.
 Boolean setLabels( <Array> _labels )
           set the labels.

Field Detail

bgColor

String bgColor

dataSets

<private> Array dataSets

fgColor

String fgColor

height

String height

labels

<private> Array labels

rendererMethodPrefix

<private> String rendererMethodPrefix

title

String title

width

String width

Constructor Detail

Graph

Graph()

Method Detail

addDataSet

Boolean addDataSet( <String> _dataId, <Array> _dataSet, <String> _color )

getDataRange

Object getDataRange()

getDataSetColor

String getDataSetColor( <Number> index )

getDataSets

Array getDataSets()

getLabels

Array getLabels()

isArray

 <private> Boolean isArray( what )

listStyles

Array listStyles()

render

Boolean render( <String> _style, <HTMLElement> _renderTarget )

renderer_accumulatedLines

Boolean renderer_accumulatedLines( svg )

renderer_bars

Boolean renderer_bars( svg )

renderer_lines

Boolean renderer_lines( svg )

renderer_pie

Boolean renderer_pie( svg )

reset

 <private> void reset()

setLabels

Boolean setLabels( <Array> _labels )


Documentation generated by JSDoc on Wed Jun 14 11:01:46 2006