Chart::HorizontalBars Class Reference

HorizontalBars class derived from class Base. More...

Inheritance diagram for Chart::HorizontalBars:
Collaboration diagram for Chart::HorizontalBars:

Private Object Methods

private int _draw_x_ticks ()
 draw the x-ticks and their labels Overwrites this function of Chart::Base

Private Functions

private _draw_data
 finally get around to plotting the data for (horizontal) bars
private int _draw_y_ticks ()
 draw the y-ticks and their labels Overwrites this function of Chart::Base
private int _find_y_scale ()
 find good values for the minimum and maximum y-value on the chart overwrite the find_y_scale function, only to get the right f_x_ticks !!!!!

Additional Inherited Members

- Public Member Functions inherited from Chart::Base
object new ()
 Standard normal constructor.
Calls.
int set (hash opts)
 Set all options.
hash getopts ()
 get all options
int add_pt (list data)
 Graph API
Add one dataset (as a list) to the dataref.
 add_pt (\\\list data)
 Graph API
Add one dataset (as a reference to a list) to the dataref via.
int add_dataset (list data)
 Graph API
Add many datasets (implemented as a list) to the dataref,.
int add_dataset (\\\list data)
 Graph API
Add many datasets (implemented as a references to alist) to the dataref,.
int add_datafile (scalar filename, scalar format)
 Graph API
it's also possible to add a complete datafile
Uses.
int clear_data ()
 Clear Graph API (by undefining 'dataref'.
arrayref get_data ()
 Get array of data of the last graph.
int png (scalar file, scalar dataref)
 Produce the graph of options set in png format.
int cgi_png (scalar dataref)
 Produce the graph of options set in png format to be directly written for CGI.
int scalar_png (scalar dataref)
 Produce the graph of options set in PNG format to be directly returned.
int jpeg (scalar file, scalar dataref)
 Produce the graph of options set in JPG format to be directly plotted.
int cgi_jpeg (scalar dataref)
 Produce the graph of options set in JPG format to be directly for CGI.
int scalar_jpeg (scalar dataref)
 Produce the graph of options set in JPG format to be directly returned.
int make_gd (scalar dataref)
 Produce the graph of options set in GD format to be directly.
 imagemap_dump ()
 get the information to turn the chart into an imagemap
 minimum (list array)
 determine minimum of an array of values
 maximum (list array)
 determine maximum of an array of values
 arccos (scalar a)
 Function arccos(a)
 arcsin (scalar a)
 Function arcsin(a)
 true (scalar arg)
 determine true value of argument
 false (scalar arg)
 determine false value of argument
 modulo (scalar a, scalar b)
 Calculate float($a % $b) as the internal operator '' does only calculate in integers.
private int _init (scalar x, scalar y)
 Initialize all default options here.
private int _copy_data (scalar extern_ref)
 Copy external data via a reference to internal memory.
private array _color_spec_to_rgb (scalar role, scalar spec)
 Return an array (list of) rgb values for spec.
private int _draw_sub_title ()
 draw the sub-title for the chart
private int _sort_data ()
 sort the data nicely (mostly for the pareto charts and xy-plots)
private int _find_x_scale ()
 For a xy-plot do the same for the x values, as '_find_y_scale' does for the y values!
private _calcTickInterval (scalar dataset_min, scalar dataset_max, scalar flag_fixed_min, scalar flag_fixed_max, scalar minTicks, scalar maxTicks)
 Calculate the Interval between ticks in y direction.
private int _calcXTickInterval (scalar min, scalar max, scalar minF, scalar maxF, scalar minTicks, scalar maxTicks)
 Calculate the Interval between ticks in x direction.
private int _countTicks (scalar min, scalar max, scalar interval)
 Works out how many ticks would be displayed at that interval.
private int _round2Tick (scalar input, scalar interval, scalar roundUP)
 Rounds up or down to the next tick of interval size.
private array _sepFP (scalar num)
 Seperates a number into it's base 10 floating point exponent & mantisa.
private array _find_y_range ()
 Find minimum and maximum value of y data sets.
private array _find_x_range ()
 Find minimum and maximum value of x data sets.
private int _plot ()
 main sub that controls all the plotting of the actual chart
private int _draw_legend ()
 let the user know what all the pretty colors mean.
private int _draw_bottom_legend ()
 put the legend on the bottom of the chart
private int _draw_right_legend ()
 put the legend on the right of the chart
private int _draw_top_legend ()
 put the legend on top of the chart
private int _draw_left_legend ()
 put the legend on the left of the chart
private int _draw_none_legend ()
 no legend to draw.
private int _draw_x_label ()
 draw the label for the x-axis
private int _draw_y_label ()
 draw the label for the y-axis
private int _draw_ticks ()
 draw the ticks and tick labels
private int _draw_x_number_ticks ()
 draw the ticks and tick labels
private int _grey_background ()
 put a grey background on the plot of the data itself
private int _draw_grid_lines ()
 draw grid_lines
private int _draw_x_grid_lines ()
 draw grid_lines for x
private int _draw_y_grid_lines ()
 draw grid_lines for y
private int _draw_y2_grid_lines ()
 draw grid_lines for y
private int _prepare_brush (scalar color, scalar type, scalar role)
 prepare brush
- Public Attributes inherited from Chart::Base
Hash named_colors
 RGB values of named colors.
private int _check_data
 Check the internal data to be displayed.
private int _draw
 Plot the chart to the gd object
Calls:
private int _set_colors
 specify my colors
private int _color_role_to_index
 return a (list of) color index(es) corresponding to the (list of) role(s)
private int _brushStyles_of_roles
 return a (list of) brushStyles corresponding to the (list of) role(s)
private int _draw_title
 draw the title for the chart
private int _default_f_tick
 default tick conversion function This function is pointed to be $self->{f_x_tick} resp.
private float _xyRatio
 Get ratio width_x/width_y.
private float _xPixelInReal
 Get width of one Pixel in real coordinates in x-direction.
private float _yPixelInReal
 Get width of one Pixel in real coordinates in y-direction.

Detailed Description

HorizontalBars class derived from class Base.

This class provides all functions which are specific to horizontal bars

Member Function Documentation

private int Chart::HorizontalBars::_draw_x_ticks ( )

draw the x-ticks and their labels Overwrites this function of Chart::Base

Returns
status

Reimplemented from Chart::Base.

private int Chart::HorizontalBars::_draw_y_ticks ( )

draw the y-ticks and their labels Overwrites this function of Chart::Base

Returns
status

Reimplemented from Chart::Base.

private int Chart::HorizontalBars::_find_y_scale ( )

find good values for the minimum and maximum y-value on the chart overwrite the find_y_scale function, only to get the right f_x_ticks !!!!!

Returns
status

Reimplemented from Chart::Base.


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