Docs For Class SVGXYGraph

## Class SVGXYGraph

Description

This is the base Graph class for doing XY coordinate system based graphs in SVG.

$Id: SVGXYGraph.html,v 1.26.2.3 2005/09/02 00:07:39 hemna Exp $

- author: Walter A. Boring IV <waboring@newsblob.com>

Located in /widgets/svg/SVGXYGraph.inc (line 28)

    Container
       |
       --BaseWidget
          |
          --SVGGraph
             |
             --SVGXYGraph

Direct descendents

Class | Description
--- | ---
SVGXYPlotGraph | This is the base Graph class for doing XY coordinate system based graphs in SVG.

Variable Summary
mixed $_colors
mixed $_max_x
mixed $_max_y
mixed $_min_x
mixed $_min_y
mixed $_x_data
mixed $_y_data
Method Summary
SVGXYGraph SVGXYGraph (mixed $title, mixed $width, mixed $height)
void add_x_values (string $x_values)
void add_y_values (string $y_values)
int get_x_position (float $x)
int get_y_position (float $y)
void set_axis_grid_points (string $axis, int $points)
void set_grid_line_color (string $color)
void set_grid_line_flag (string $axis, [boolean $flag = TRUE])
void set_x_title (string $title)
void set_y_title (string $title)
void _add_options ()
void _background ()
Container _build_graph ()
Container _build_titles ()
Container _build_x_axis ()
Container _build_y_axis ()
void _prepare_data ()
TEXTsvgtag _x_axis_title ()
TEXTsvgtag _y_axis_title ()
Variables
mixed $_colors = array() (line 48)

holds the colors for each of

the lines

mixed $_max_x = 0 (line 35)
mixed $_max_y = 0 (line 42)
mixed $_min_x = 0 (line 34)
mixed $_min_y = 0 (line 41)
mixed $_x_data = array() (line 33)

this holds the X axis data

mixed $_y_data = array() (line 40)

this holds the Y axis data

#### Inherited Variables

Inherited from SVGGraph

> SVGGraph::$_draw
> SVGGraph::$_options

Inherited from BaseWidget

> BaseWidget::$title
> BaseWidget::$width
> BaseWidget::$_image_prefix

Methods
Constructor SVGXYGraph (line 51)
SVGXYGraph SVGXYGraph (mixed $title, mixed $width, mixed $height)
add_x_values (line 164)

This function is used to add a new set of x values for the graph.

NOTE: this must be a comma delimited list of values.

void add_x_values (string $x_values)

- string $x_values: - the values

add_y_values (line 177)

This function is used to add a new set of y values for the graph.

NOTE: this must be a comma delimited list of values.

void add_y_values (string $y_values)

- string $y_values: - the values

get_x_position (line 360)

This function returns the pixel positions of a data point

- return: position in pixels

int get_x_position (float $x)

- float $x: data point

get_y_position (line 344)

This function returns the pixel positions of a data point

- return: position in pixels

int get_y_position (float $y)

- float $y: data point

set_axis_grid_points (line 208)

This is used to set how many grid lines to draw for an axis

void set_axis_grid_points (string $axis, int $points)

- string $axis: - the axis, x/y only
- int $points: - how many lines

set_grid_line_color (line 226)

This allows you to set the color of the axis grid lines

void set_grid_line_color (string $color)

- string $color: - the color name

set_grid_line_flag (line 189)

This enables/disables the rendering of the grid lines for an axis

void set_grid_line_flag (string $axis, [boolean $flag = TRUE])

- string $axis: - the axis, x/y only
- boolean $flag: - TRUE = Enabled

set_x_title (line 141)

This function is used to set the title for the X Axis

void set_x_title (string $title)

- string $title: - the title

set_y_title (line 151)

This function is used to set the title for the Y Axis

void set_y_title (string $title)

- string $title: - the title

_add_options (line 102)

this method adds our own options that

are different from the parent class

void _add_options ()
_background (line 326)
void _background ()
_build_graph (line 84)

This function does the work of building the graph itself

Container _build_graph ()

Redefinition of:

SVGGraph::_build_graph()
  This is a stub that the child class must override to build the actual graph

_build_titles (line 68)

This is a stub for building the title(s) for the graph

Container _build_titles ()

Redefinition of:

SVGGraph::_build_titles()
  This is a stub for building the title(s) for the graph

_build_x_axis (line 373)

This function builds the X axis and its measurement lines/marks

Container _build_x_axis ()
_build_y_axis (line 428)

This function builds the Y axis and its measurement lines/marks

Container _build_y_axis ()
_prepare_data (line 235)

We need this to calculate the min,max values for

both all x points and all y data points, so we can scale the graph correctly

void _prepare_data ()

Redefinition of:

SVGGraph::_prepare_data()
  This is a stub meant to provide a means for doing any data parsing/munging prior to actually building the svg for the graph output.

_x_axis_title (line 297)

This method builds the text title area that lives in the X axis

TEXTsvgtag _x_axis_title ()
_y_axis_title (line 314)

This method builds the text title area that lives in the X axis

TEXTsvgtag _y_axis_title ()

#### Inherited Methods

Inherited From SVGGraph

> SVGGraph::SVGGraph()
> SVGGraph::format_label()
> SVGGraph::get_option()
> SVGGraph::get_options()
> SVGGraph::render()
> SVGGraph::set_axis_font_height()
> SVGGraph::set_axis_font_width()
> SVGGraph::set_height()
> SVGGraph::set_option()
> SVGGraph::set_title()
> SVGGraph::set_title_font_height()
> SVGGraph::set_title_font_width()
> SVGGraph::set_title_style()
> SVGGraph::set_width()
> SVGGraph::_build_graph()
> SVGGraph::_build_title()
> SVGGraph::_build_titles()
> SVGGraph::_prepare_data()

Inherited From BaseWidget

> BaseWidget::get_align()
> BaseWidget::get_css()
> BaseWidget::get_javascript()
> BaseWidget::get_title()
> BaseWidget::get_width()
> BaseWidget::set_align()
> BaseWidget::set_image_path_prefix()
> BaseWidget::set_title()
> BaseWidget::set_width()

Inherited From Container

> Container::Container()
> Container::add()
> Container::add_reference()
> Container::count_content()
> Container::get_element()
> Container::get_indent_flag()
> Container::push()
> Container::push_reference()
> Container::render()
> Container::reset_content()
> Container::set_collapse()
> Container::set_indent_flag()

Documentation generated on Thu, 1 Sep 2005 17:06:32 -0700 by phpDocumentor 1.3.0RC3