Chart::Direction Class Reference

Direction class derived class for Chart to implement direction charts. More...

Inheritance diagram for Chart::Direction:

Inheritance graph
[legend]
Collaboration diagram for Chart::Direction:

Collaboration graph
[legend]

List of all members.

Private Functions

private _draw_data
 finally get around to plotting the data for direction charts
private int _find_y_scale ()
 we use the find_y_scale methode to determine the labels of the circles and the amount of them
private _calcTickInterval (scalar dataset_min, scalar dataset_max, scalar flag_fixed_min, scalar flag_fixed_max, scalar minTicks, scalar maxTicks)
 Calculates the ticks for direction in normalised units.
private int _draw_y_ticks ()
 draw the circles and the axes
private int _draw_x_ticks ()
 We don't need x ticks, it's all done in _draw_y_ticks.
private int _prepare_brush (scalar color, scalar type)
 set the gdBrush object to trick GD into drawing fat lines
private int _draw_legend ()
 let them know what all the pretty colors mean
private array _find_y_range ()
 Find minimum and maximum value of y data sets.

Public Object Methods

Todo:
calculate the width of the labels


int set (hash opts)
 Set all options.
int add_dataset (list data)
 Add many datasets to the dataref.

Protected Object Methods

protected retval _calcTickInterval ()


Detailed Description

Direction class derived class for Chart to implement direction charts.

Member Function Documentation

int Chart::Direction::set ( hash  opts  ) 

Set all options.

Parameters:
[in] %opts Hash of options to the Chart
Returns:
ok or croak
main method for customizing the chart, lets users specify values for different parameters
dont check the number of points in the added datasets in a polarplot
overwrite Base method

Reimplemented from Chart::Base.

int Chart::Direction::add_dataset ( list  data  ) 

Add many datasets to the dataref.

Graph API
Overwrite Base method

Parameters:
@data Dataset to add

Reimplemented from Chart::Base.

private int Chart::Direction::_find_y_scale (  ) 

we use the find_y_scale methode to determine the labels of the circles and the amount of them

Returns:
status
This function is an overwrite to the same function found in the base class Chart::Base

Reimplemented from Chart::Base.

private Chart::Direction::_calcTickInterval ( scalar  dataset_min,
scalar  dataset_max,
scalar  flag_fixed_min,
scalar  flag_fixed_max,
scalar  minTicks,
scalar  maxTicks 
)

Calculates the ticks for direction in normalised units.

Calculate the Interval between ticks in y direction and compare the number of ticks to the user given values min_y_ticks, max_y_ticks

Parameters:
[in] $dataset_min Minimal value in y direction
[in] $dataset_max Maximal value in y direction
[in] $flag_fixed_min Indicator whether the dataset_min value is fixed
[in] $flag_fixed_max Indicator whether the dataset_max value is fixed
[in] $minTicks Minimal number of ticks wanted
[in] $maxTicks Maximal number of ticks wanted
Returns:
$tickInterval, $tickCount, $pMin, $pMax

Reimplemented from Chart::Base.

private int Chart::Direction::_draw_y_ticks (  ) 

draw the circles and the axes

Overwrites _draw_y_ticks() of Base class

Returns:
status

Reimplemented from Chart::Base.

private int Chart::Direction::_draw_x_ticks (  ) 

We don't need x ticks, it's all done in _draw_y_ticks.

Returns:
status
Overwrites the corresponding function in Base

Reimplemented from Chart::Base.

private int Chart::Direction::_prepare_brush ( scalar  color,
scalar  type 
)

set the gdBrush object to trick GD into drawing fat lines

Parameters:
$color 
$type 
Returns:
status

private int Chart::Direction::_draw_legend (  ) 

let them know what all the pretty colors mean

Returns:
status
Overwrite corresponding function of Base

Reimplemented from Chart::Base.

private array Chart::Direction::_find_y_range (  ) 

Find minimum and maximum value of y data sets.

Returns:
( min, max, flag_all_integers )
Overwrites corresponding Base function

Reimplemented from Chart::Base.


The documentation for this class was generated from the following file:

Generated on Thu Sep 23 15:06:25 2010 by  doxygen 1.5.6