Class Plot
(Defined in: jpgraph.php : 5093)
 
 Plot 
 HideLegend() 
 PreScaleSetup() 
 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

 

Plot ::
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();

 

Plot ::
PreScaleSetup($aGraph)
// Virtual function to the the concrete plot class to make any changes to the graph// and scale before the stroke process begins

ArgumentDefaultDescription
$aGraph  No description available

Description:
No description available.

 

Plot ::
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();

 

Plot ::
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');

 

Plot ::
SetCSIMTargets($aTargets, $aAlts, $aWinTargets)
Set URL targets for CSIM

ArgumentDefaultDescription
$aTargets  Array of URL targets
$aAlts '' Alt texts for each CSIM point
$aWinTargets '' No description available

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

 

Plot ::
SetLegend($aLegend, $aCSIM, $aCSIMAlt, $aCSIMWinTarget)
Set legend string for this plot

ArgumentDefaultDescription
$aLegend  Legend string
$aCSIM '' URL for image map
$aCSIMAlt '' Alt text for image map
$aCSIMWinTarget '' No description available

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:

Example:

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

 

Plot ::
SetLineWeight($aWeight)
Specify line weight for plot

ArgumentDefaultDescription
$aWeight 1 Line weight in pixels

Description:
Specify line weight for plot 

Example:

$lineplot->SetWeight(2);