[ class tree: phpchartPlus ] [ index: phpchartPlus ] [ all elements ]

Class: Chart

Source Location: /Chart.php

Class Overview


Base class for all chart types.


Author(s):

Variables

Methods


Child classes:

LineChart
LineChart generation
BarChart
BarChart generation
PieChart
PieChart generation
AreaChart
AreaChart generation

Class Details

[line 32]
Base class for all chart types.

Base class for all chart types.Subclasses must implement the abstract function Chart::draw() to gain the parent class functionality




Tags:

abstract:  
license:  GNU Public License
author:  Tsiavos Chris <jaames@freemail.gr>


[ Top ]


Class Variables

$Area_xsize =

[line 45]

Holds the xsize value of the charting area



Tags:

access:  protected

Type:   integer


[ Top ]

$Area_ysize =

[line 52]

Holds the ysize value of the charting area



Tags:

access:  protected

Type:   integer


[ Top ]

$Caching_Strategy_ =

[line 92]

Holds a reference to the selected caching strategy



Tags:

access:  protected

Type:   mixed


[ Top ]

$Chart_Image =

[line 38]

Holds the Chart Image Handler



Tags:

access:  protected

Type:   mixed


[ Top ]

$Chart_Yscale =

[line 59]

Holds the yscale value of the chart



Tags:

access:  protected

Type:   integer


[ Top ]

$Chart_ZeroPos =

[line 66]

Indicates the grid position with value 0



Tags:

access:  protected

Type:   integer


[ Top ]

$ColorAllocator_ =

[line 86]

Holds a reference to the ColorAllocator instance



Tags:

access:  protected

Type:   ColorAllocator


[ Top ]

$ConfigParser_ =

[line 72]

Holds a reference to the ConfigParser instance



Tags:

access:  protected

Type:   ConfigParser


[ Top ]

$DataParser_ =

[line 79]

Holds a reference to the DataParser instance



Tags:

access:  protected

Type:   DataParser


[ Top ]

$Font_ =

[line 98]

Holds a reference to the Font instance



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 103]

Chart __construct( )

Chart Constructor



[ Top ]

destructor __destruct [line 235]

void __destruct( )

Destructor. Destroyes the Chart Image handler



[ Top ]

method Colorize_ChartArea [line 175]

void Colorize_ChartArea( )

Colorizes the image and the calculated chart area with the appropriate colors



Tags:

access:  protected


[ Top ]

method draw [line 360]

void draw( )

Abstract function,overriden by subclasses to draw the selected chart type (Bar, Line,Area,Pie)



Tags:

abstract:  
access:  protected


Overridden in child classes as:

LineChart::draw()
BarChart::draw()
PieChart::draw()
AreaChart::draw()

[ Top ]

method draw_Chart [line 286]

void draw_Chart( )

Calls Chart::Colorize_ChartArea(),Chart::get_DrawingArea_Size(),Chart::draw_Grids(),

Chart::draw_Legend and Chart::draw() to draw the complete chart image




Tags:

access:  public


[ Top ]

method draw_Grids [line 367]

void draw_Grids( )

Draws the grids in the calculated chart area



Tags:

access:  protected


Overridden in child classes as:

PieChart::draw_Grids()

[ Top ]

method draw_Legend [line 244]

void draw_Legend( )

Draws the legend

return void




Tags:

access:  protected


[ Top ]

method get_DrawingArea_Size [line 223]

void get_DrawingArea_Size( )

Calculates the dimensions of the chart drawing area



Tags:

access:  protected


[ Top ]

method Initialize_Font [line 209]

void Initialize_Font( )

Initializes the Font instance



Tags:

access:  protected


[ Top ]

method set_CachingStrategy [line 165]

void set_CachingStrategy( mixed &$CachingStrategy_Object, [integer $CacheForMinutes = NULL], [mixed $Params = NULL])

Specifies the Caching Strategy the class will follow. Caching Strategy objects provide a common interface to the class for supporting multiple methods of caching the generated images.


The available Caching Strategy Objects are:

  • NullCaching_Strategy. Provides no caching strategy to the class. It should be used when we dont want to cache the generated image
  • CacheToFile_Strategy. Caches the generated image in a file
  • CacheToPEARDB_Strategy. Caches the generated image in a database
For more info read the Strategy Pattern




Tags:

access:  public
link:  http://c2.com/cgi/wiki?StrategyPattern


Parameters:

mixed   $CachingStrategy_Object  
integer   $CacheForMinutes   Specifies the validity period of the cached image
mixed   $Params   Specifies an arbitrary number of parameters, passed to the selected CachingStrategy object

[ Top ]

method set_ColorAllocator [line 131]

void set_ColorAllocator( ColorAllocator &$ColorAllocator)

Specifies the ColorAllocator instance to use for in-class scope operations



Tags:

access:  public


Parameters:

ColorAllocator   $ColorAllocator  

[ Top ]

method set_ConfigParser [line 121]

void set_ConfigParser( ConfigParser &$ConfigParser)

Specifies the ConfigParser Instance for in-class scope operations



Tags:

access:  public


Parameters:

ConfigParser   $ConfigParser  

[ Top ]

method set_DataParser [line 111]

void set_DataParser( DataParser &$DataParser)

Specifies the DataParser Instance for in-class scope operations



Tags:

access:  public


Parameters:

DataParser   $DataParser  

[ Top ]

method set_Font [line 141]

void set_Font( Font &$Font)

Specifies the Font instance to use for in-class scope operations



Tags:

access:  public


Parameters:

Font   $Font  

[ Top ]


Documentation generated on Sun, 3 Oct 2004 14:58:57 +0300 by phpDocumentor 1.3.0RC3