CLASS Plot
(Defined in: jpgraph.php : 5626)
 Plot 
 HideLegend() 
 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 HideLegend($f)
Hide legend for this plot

ArgumentDefaultDescription
$f true TRUE=Hide legend

Description
Hide legend for this plot even if it was specified (with SetLegend() )  

Example

$bar = new GanttBar(...);
$bar->HideLegend();

 

 

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  Array of URL targets
$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,$aCSIM,$aCSIMAlt)
Set legend string for this plot

ArgumentDefaultDescription
$aLegend  Legend string
$aCSIM "" URL for image map
$aCSIMAlt "" Alt text for image map

Description
Set legend string for this plot. If the CSIM string is epscified then the legend will become an image map. To use image maps you need to use the StrokeCSIM() instead of the normal Stroke() 
 
See also
Graph::StrokeCSIM

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);