blueshoes php application framework and cms            core_gfx
[ class tree: core_gfx ] [ index: core_gfx ] [ all elements ]

Class: Bs_Chart

Source Location: /core/gfx/chart/Bs_Chart.class.php

Class Overview

Bs_Object
   |
   --Bs_Chart

Chart Class.


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:37 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 47]
Chart Class.

A gui and rendering class for jpGraph (using multistep forms and domapi).

functionality: -

missing: -

dependencies: jpGraph, Bs_Form, Bs_HtmlUtil, domapi




Tags:

pattern:  singleton: (pseudostatic)
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:37 $
copyright:  blueshoes.org
author:  andrej arn <at blueshoes dot org>


[ Top ]


Class Variables

$Bs_HtmlUtil =

[line 57]

reference to global pseudostatic instance of Bs_HtmlUtil. gets set in the constructor.



Tags:

access:  public

Type:   object


[ Top ]

$chartCaptionX =  ''

[line 148]

caption for the x-row.



Tags:

access:  public

Type:   string


[ Top ]

$chartCaptionY =  ''

[line 155]

caption for the y-row.



Tags:

access:  public

Type:   string


[ Top ]

$chartHeight =  200

[line 134]

obvious.



Tags:

access:  public

Type:   int


[ Top ]

$chartName =  ''

[line 96]



Tags:

access:  public

Type:   string


[ Top ]

$chartSubtype =  'grouped'

[line 120]

for some chart types there are different variants.

bar:

  • grouped (default)
  • stapled




Tags:

access:  public

Type:   string


[ Top ]

$chartTitle =  ''

[line 141]

obvious.



Tags:

access:  public

Type:   string


[ Top ]

$chartType =  'bar'

[line 107]

the type of the chart. default is 'bar'. one of:

  • bar
  • line
  • pie




Tags:

var:  chartType
access:  public

Type:   string


[ Top ]

$chartWidth =  300

[line 127]

obvious.



Tags:

access:  public

Type:   int


[ Top ]

$dataRowIn =  'row'

[line 169]

if the data is aligned in rows (default) or in cols.

if this is set to 'col' that means we have to flip the data, that's it.

i'd normally define this as bool $flip but because of the gui i don't.




Tags:

access:  public

Type:   string


[ Top ]

$firstRowTitle =

[line 184]

if the first row is a title row. means it's not numbers to work on.

note that 'row' refers to the effectual data row and may in fact be a column, check $dataRowIn.

if this var is not set by the user then we try to find it out ourself. if the data is numeric then it's not a title row, otherwise it is.




Tags:

see:  Bs_Chart::isFirstRowTitle()
access:  public

Type:   bool


[ Top ]

$gridHelperX =  FALSE

[line 300]

tells if minor (detailed) horizontal grid lines should be used.

default is FALSE.




Tags:


Type:   bool


[ Top ]

$gridHelperY =  FALSE

[line 318]

tells if minor (detailed) vertical grid lines should be used.

default is FALSE.




Tags:


Type:   bool


[ Top ]

$gridMainX =  TRUE

[line 291]

tells if major horizontal grid lines should be used.

default is TRUE.




Tags:


Type:   bool


[ Top ]

$gridMainY =  FALSE

[line 309]

tells if major vertical grid lines should be used.

default is FALSE.




Tags:


Type:   bool


[ Top ]

$ID =  ''

[line 82]



Tags:

access:  public

Type:   mixed


[ Top ]

$legendAlign =

[line 282]

tells if the legend should be aligned 'hor' or 'vert'.

examples:

this is horizontal

this is vertical




Tags:


Type:   string


[ Top ]

$legendInDataWhere =  ''

[line 206]

where is the legend data?

this replaces the previous var $firstColLegend, now the legend data can be everywhere: 'colfirst' 'collast' 'rowfirst' 'rowlast' if (empty($legendInDataWhere)) then there is none.




Tags:

access:  public

Type:   string


[ Top ]

$legendLocationX =

[line 255]

tells where the legend should be located on the x-row.

possible values are: 'left', 'center', 'right'.




Tags:


Type:   string


[ Top ]

$legendLocationY =

[line 265]

tells where the legend should be located on the y-row.

possible values are: 'top', 'center'. note that 'bottom' is not [yet] supported by jpGraph. dunno why.




Tags:


Type:   string


[ Top ]

$legendShow =

[line 246]

tells if the legend is desired.



Tags:


Type:   bool


[ Top ]

$manualLegend =  ''

[line 220]

semicolon-separated string.



Tags:

see:  vars $useManualLegendInstead, Bs_Chart::$legendInDataWhere
access:  public

Type:   string


[ Top ]

$useManualLegendInstead =  FALSE

[line 212]



Tags:

access:  public

Type:   bool


[ Top ]



Class Methods


constructor Bs_Chart [line 362]

Bs_Chart Bs_Chart( )

constructor.



[ Top ]

method bs_sop_getHints [line 1728]

array bs_sop_getHints( object $sopAgent)

****************************************************************************************************

CALLBACK Funtion of Bs_SimpleObjPersister Use of callback methods to return the hint-hash




Parameters:

object   $sopAgent  

[ Top ]

method draw [line 384]

void draw( )

creates the chart and sends it (to the browser).



Tags:

access:  public


[ Top ]

method getLegendCaption [line 747]

mixed getLegendCaption( [int $row = null])

returns the legend caption for the row specified.

if the param $row is not specified or null then all legend captions will be returned as a vector.




Tags:

return:  (string or array)
access:  public


Parameters:

int   $row   (starting at 1 not 0)

[ Top ]

method getLegendData [line 356]

void getLegendData( )

returns an array



[ Top ]

method isFirstColLegend [line 725]

bool isFirstColLegend( )

tells if the first col is for the legend.



Tags:

todo:  finish implementation
see:  $firstColLegend
access:  public


[ Top ]

method isFirstRowTitle [line 707]

bool isFirstRowTitle( )

tells if the first row is a title row.



Tags:

todo:  finish implementation
see:  Bs_Chart::$firstRowTitle
access:  public


[ Top ]

method prepareData [line 646]

bool prepareData( )



Tags:

return:  (TRUE on success, FALSE on failure.)
todo:  finish implementation, currently only works with dataCsv.
access:  public


[ Top ]

method setData [line 374]

void setData( array $data)

sets ready-to-use data.



Tags:

access:  public


Parameters:

array   $data  

[ Top ]

method treatForm [line 577]

mixed treatForm( )



Tags:

return:  (array like Bs_Form->getAll(), or bool TRUE after a successful submit.)
access:  public


[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:08:07 +0100 by phpDocumentor 1.2.3