(Defined in: jpgraph_stock.php : 15)
Class usage and Overview
Create a stock chart graph, aka Candle-chart, aka Box-graph.
Each data point is represented by four values
(open,close,min,max)
Class Methods
Show horizontal mark lines at the end of min/max lines
Argument | Default | Description |
$aHide
|
true
| Flag true=show end lines |
Description:
Show horizontal mark lines at the end of min/max lines. This is enabled by default.
$stock->HideEndLines();
Specify colors for the stock plot
Argument | Default | Description |
$aColor
| | Line color for positive bars |
$aColor1
|
'white'
| Fill color for positive bars |
$aColor2
|
'darkred'
| Line color for negative bars |
$aColor3
|
'darkred'
| Fill color for negative bars |
Description:
Specify the colros for a stock chart. A positive bar is defined as a bar where close > open. A negative bar is defined as a bar where close < open.
The positive line color is always used for the min/max lines.
By default positve colors are black and white. Negative colors are 'red' and 'red'.
$stockplot->SetColor('black','white','red','red');
Specify width for stock bars in pixels
Argument | Default | Description |
$aWidth
| | Width in pixels |
Description:
Specify width for stock bars in pixels
$stockplot->SetWidth(8);
Constructor for Stock plots
Argument | Default | Description |
$datay
| | No description available |
$datax
|
false
| X data array |
Description:
Create a new Stock data plot. Each data value consists of 4 data points. (open,close,min,max)
If the $ydata isn't an even number of data quadruples an error message will result.
$ydata = array( .... )
$stockplot = new StockPlot($ydata);