Class SVGGraph

Description

This is the base Graph class for doing SVG graphs

$Id: SVGGraph.html,v 1.12 2003/08/01 01:37:46 hemna Exp $

Located in Program_Root/widgets/svg/SVGGraph.inc (line 23)

Container
   |
   --BaseWidget
      |
      --SVGGraph
Direct descendents
Class Description
SVGXYGraph This is the base Graph class for doing XY coordinate system based graphs in SVG.
Variable Summary
mixed $_draw
mixed $_options
Method Summary
void SVGGraph (mixed $title, mixed $width, mixed $height)
string format_label (string $number)
mixed get_option (string $name)
array get_options ()
void render (mixed $indent_level, mixed $output_debug)
void set_axis_font_height (int $height)
void set_axis_font_width (int $width)
void set_height (int $height)
void set_option (string $name, mixed $value)
void set_title (string $title)
void set_title_font_height (int $height)
void set_title_font_width (int $width)
void set_title_style (string $style)
void set_width (int $width)
Container _build_graph ()
Container _build_titles ()
void _prepare_data ()
Variables
mixed $_draw = array() (line 50)

Various calculated image properties

mixed $_options = array("title" => "",
"title_style" => "font-size:20px;font-weight:bold;font-family: geneva, trebuchet ms",
"width" => 100,
"height" => 100,
"left_margin" => 5,
"right_margin" => 0,
"top_margin" => 20,
"bottom_margin" => 0,
"title_font_width" => 10,
"title_font_height" => 20,
"axis_font_width" => 5,
"axis_font_height" => 8,
"axis_label_font_width" => 12,
"axis_label_font_height" => 12)
(line 30)

This array holds various

config options for this graph

Inherited Variables

Inherited from BaseWidget

BaseWidget::$title
BaseWidget::$width

Inherited from Container

Container::$_flags
Methods
Constructor SVGGraph (line 53)
void SVGGraph (mixed $title, mixed $width, mixed $height)
format_label (line 235)

This function will format the axis label

  • return:

    - the formated #

string format_label (string $number)
  • string $number:

    - the number

get_option (line 128)

This function retuns the value of 1 option

  • return:

    - the value

mixed get_option (string $name)
  • string $name:

    - the option name

get_options (line 138)

This returns the array of ALL of the options for this graph

array get_options ()
render (line 60)
void render (mixed $indent_level, mixed $output_debug)

Redefinition of:
Container::render()
This function is compatible with the rest of the phpHtmllib API spec.
set_axis_font_height (line 224)

This method sets the height of font used in calculating the x and y axis point fonts.

void set_axis_font_height (int $height)
  • int $height:

    - the height

set_axis_font_width (line 213)

This method sets the width of font used in calculating the x and y axis point fonts.

void set_axis_font_width (int $width)
  • int $width:

    - the width

set_height (line 179)

This method sets the height of the graph

void set_height (int $height)
  • int $height:

    - the height

set_option (line 117)

This function is used to set a particular option for the graph

void set_option (string $name, mixed $value)
  • string $name:

    - the option name

  • mixed $value:

    - the value

set_title (line 149)

This method sets the title for the graph

void set_title (string $title)
  • string $title:

    - the graph's title


Redefinition of:
BaseWidget::set_title()
Set the title for the widget.
set_title_font_height (line 201)

This method sets the height of font in pixels for the Graph Title.

void set_title_font_height (int $height)
  • int $height:

    - the height

set_title_font_width (line 190)

This method sets the width of font in pixels for the Graph Title.

void set_title_font_width (int $width)
  • int $width:

    - the width

set_title_style (line 159)

This method sets the title for the graph

void set_title_style (string $style)
  • string $style:

    - the graph's title

set_width (line 169)

This method sets the width of the graph

void set_width (int $width)
  • int $width:

    - the width


Redefinition of:
BaseWidget::set_width()
Set the width for the widget.
_build_graph (line 99)

This is a stub that the child class must override to build the actual graph

Container _build_graph ()

Redefined in descendants as:
_build_title (line 246)

This method builds the text title area that lives on top of the graph

TEXTsvgtag _build_title ()
_build_titles (line 88)

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

Container _build_titles ()

Redefined in descendants as:
_prepare_data (line 77)

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.

void _prepare_data ()

Redefined in descendants as:

Inherited Methods

Inherited From BaseWidget

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

Inherited From Container

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

Documention generated on Thu, 31 Jul 2003 18:33:01 -0700 by phpDocumentor 1.2.0