CLASS Plot
(Defined in: jpgraph.php : 5555)
 Plot 
 SetCenter() 
 SetColor() 
 SetCSIMTargets() 
 SetLegend() 
 SetLineWeight() 
 

Class usage and Overview
Abstract base class for all plots. This abstract base class defines the signature that all plots must adhere to. It also provides the default trivial implementation for these framework methods. Public properties:
Name Type Description
value DisplayValue Control the data value displayed at each data point

 

See also related classes:
DisplayValue, LinePlot, ErrorPlot and ScatterPlot

 


Class Methods

 

 

function SetCenter($aCenter)
Center the data pointr between tick labels

ArgumentDefaultDescription
$aCenter true True=Center each data point

Description
Used for text scales. Centers the data values between the ticvk marks instead if falling exactly on them.  

Example

$barplot->SetCenter();

 

 

function SetColor($aColor)
Specify color for plot.

ArgumentDefaultDescription
$aColor  Color

Description
Specify color for plot. Each plot type is free to interpret it to its own choosing. 

Example

$lineplot->SetColor('red');

 

 

function SetCSIMTargets(&$aTargets,$aAlts)
Set URL targets for CSIM

ArgumentDefaultDescription
&$aTargets  URL for each CSIM point
$aAlts null Alt texts for each CSIM point

Description
Set the URL links for the CSIM if the plot type support this. 

Example

$url1 "http://someotherurl.html"
$url2 = ..
...

$targetarray = array($url1$url2$url3$url4);
$barplot->SetCSIMTargets($targetarray);

 

 

function SetLegend($aLegend)
Set legend string for this plot

ArgumentDefaultDescription
$aLegend  Legend string

Description
Set legend string for this plot 

Example

$lineplot->SetLegend('Year 2002');

 

 

function SetLineWeight($aWeight)
Specify line weight for plot

ArgumentDefaultDescription
$aWeight 1 Line weight in pixels

Description
Specify line weight for plot 

Example

$lineplot->SetWeight(2);