NAME

Liz::Survey::Graph::Bar - module for Bar objects of the Survey


SYNOPSIS

 use Liz::Survey;
 $survey = new Liz::Survey;

 $graph = $question->Graph( $graphID );
 $graph = $question->Graph;

 $bar = $graph->Bar( $textID );
 $bar->update;


EXAMPLES


DESCRIPTION

Provide object oriented access to bars of graphs in a Survey. Usually not accessed directly, but rather through the Liz::Survey object and its Graph method.


BASIC METHODS


new

Create a new Bar object from a Graph object.

Input Parameters

 1 Liz::Survey::Graph object
 2 textID of the choice with which to create Bar
Output Parameters

 1 instantiated object
Note

It is not intended to call this method directly, but rather indirectly through the Liz::Survey module.

Example

 $survey = new Liz::Survey;
 $question = $survey->Question;
 $question = $survey->Question( $questionID );

 $bar = $graph->Bar( $textID );


update

Update a Graph object in the Liz::Survey database.

Output Parameters

 1 textID with which Bar was updated
Example

 $textID = $graph->update;


delete

Delete a Liz::Survey::Graph object from the database.

Output Parameters

 1 flag: whether action was successful
Example

 $question->delete;


OBJECT METHODS

The following methods return objects.


Picture

Return the Picture object associated with this Bar. If called when there is no Picture associated with the bar already, a new Picture object will be created automatically and associated with the Bar.

Output Parameters

 1 current/new Picture object
Example

 $picture = $bar->Picture;


CONTENT METHODS

The following methods allow you to inspect and/or change certain fields of the Liz::Survey::Graph object.


Color

Set the colour of the Legenda of the Bar object.

Input Parameters

 1 new colour's alpha string indicating colour (e.g. 'FFFFF') or amount of Red
 2 new colour's amount of Green
 3 new colour's amount of Blue
Output Parameters

 1 current/prevous colour's alpha string or amount of Red
 2 amount of Green
 3 amount of Blue
Example

 $bar->Color( 'FF00FF' );
 $bar->Color( 255,0,255 );

 ($color) = $bar->Color;
 ($red,$green,$blue) = $bar->Color;


GraphID

Return the graphID of this Bar in the Liz::Survey::Graph::Bar object.

Output Parameters

 1 current graphID
Example

 $graphID = $bar->GraphID;


Height

Set or return the Height for the Bar in the Liz::Survey::Graph::Bar object.

Input Parameters

 1 new height
   (default: no change)
Output Parameters

 1 current/previous height
Example

 $bar->Height( $height );
 $height = $bar->Height;


ID

Return the ID of the Liz::Survey::Graph::Bar object.

Output Parameters

 1 current ID of the object (is in fact the textID)
Example

 $ID = $bar->ID;


Legenda

Set or return the Legenda of the Liz::Survey::Graph::Bar object.

Input Parameters

 1 new legenda
   (default: no change)
Output Parameters

 1 current/previous legenda
Example

 $graph->Legenda( $legenda );
 $legenda = $graph->Legenda;


PictureID

Return the ID of the Picture object associated with this Bar. It is usually easier to call the Picture method instead.

Output Parameters

 1 ID of the Picture object
Example

 $pictureID = $bar->PictureID;


Sizing

Set or return the alignment of the Bar in the Liz::Survey::Graph::Bar object.

The following values are recognized:

 0 crop
 1 shift
Input Parameters

 1 new sizing
   (default: no change)
Output Parameters

 1 current/previous sizing
Example

 $bar->Sizing( $sizing );
 $sizing = $bar->Sizing;


Width

Set or return the Width for the Bar in the Liz::Survey::Graph::Bar object.

Input Parameters

 1 new width
   (default: no change)
Output Parameters

 1 current/previous width
Example

 $bar->Width( $width );
 $width = $bar->Width;


AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )


COPYRIGHT

(C) 1999 International Network Consultants


HISTORY

Version 0.1, 30 September 1999

First version of this true Perl module.