Doxygen
This commit is contained in:
parent
f79d004e3c
commit
d9d3a11ec4
@ -77,7 +77,7 @@ class DolGraph
|
|||||||
var $bgcolorgrid; // array(R,G,B)
|
var $bgcolorgrid; // array(R,G,B)
|
||||||
var $datacolor; // array(array(R,G,B),...)
|
var $datacolor; // array(array(R,G,B),...)
|
||||||
|
|
||||||
private $stringtoshow; // To store string to output graph into HTML page
|
private $_stringtoshow; // To store string to output graph into HTML page
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,7 +93,9 @@ class DolGraph
|
|||||||
$isgdinstalled=0;
|
$isgdinstalled=0;
|
||||||
foreach ($modules_list as $module)
|
foreach ($modules_list as $module)
|
||||||
{
|
{
|
||||||
if ($module == 'gd') { $isgdinstalled=1; }
|
if ($module == 'gd') {
|
||||||
|
$isgdinstalled=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (! $isgdinstalled)
|
if (! $isgdinstalled)
|
||||||
{
|
{
|
||||||
@ -121,7 +123,7 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Set Y precision
|
* Set Y precision
|
||||||
*
|
*
|
||||||
* @param float $which_prec
|
* @param float $which_prec Precision
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function SetPrecisionY($which_prec)
|
function SetPrecisionY($which_prec)
|
||||||
@ -133,7 +135,8 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Utiliser SetNumTicks ou SetHorizTickIncrement mais pas les 2
|
* Utiliser SetNumTicks ou SetHorizTickIncrement mais pas les 2
|
||||||
*
|
*
|
||||||
* @param float $xi
|
* @param float $xi Xi
|
||||||
|
* @return boolean True
|
||||||
*/
|
*/
|
||||||
function SetHorizTickIncrement($xi)
|
function SetHorizTickIncrement($xi)
|
||||||
{
|
{
|
||||||
@ -144,7 +147,8 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Utiliser SetNumTicks ou SetHorizTickIncrement mais pas les 2
|
* Utiliser SetNumTicks ou SetHorizTickIncrement mais pas les 2
|
||||||
*
|
*
|
||||||
* @param float $xt
|
* @param float $xt Xt
|
||||||
|
* @return boolean True
|
||||||
*/
|
*/
|
||||||
function SetNumXTicks($xt)
|
function SetNumXTicks($xt)
|
||||||
{
|
{
|
||||||
@ -155,7 +159,8 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Set label interval to reduce number of labels
|
* Set label interval to reduce number of labels
|
||||||
*
|
*
|
||||||
* @param float $x
|
* @param float $x Label interval
|
||||||
|
* @return boolean True
|
||||||
*/
|
*/
|
||||||
function SetLabelInterval($x)
|
function SetLabelInterval($x)
|
||||||
{
|
{
|
||||||
@ -165,6 +170,9 @@ class DolGraph
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide X grid
|
* Hide X grid
|
||||||
|
*
|
||||||
|
* @param boolean $bool XGrid or not
|
||||||
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
function SetHideXGrid($bool)
|
function SetHideXGrid($bool)
|
||||||
{
|
{
|
||||||
@ -174,6 +182,9 @@ class DolGraph
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide Y grid
|
* Hide Y grid
|
||||||
|
*
|
||||||
|
* @param boolean $bool YGrid or not
|
||||||
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
function SetHideYGrid($bool)
|
function SetHideYGrid($bool)
|
||||||
{
|
{
|
||||||
@ -182,8 +193,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set y label
|
||||||
*
|
*
|
||||||
* @param unknown_type $label
|
* @param string $label Y label
|
||||||
|
* @return boolean True
|
||||||
*/
|
*/
|
||||||
function SetYLabel($label)
|
function SetYLabel($label)
|
||||||
{
|
{
|
||||||
@ -191,8 +204,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set width
|
||||||
*
|
*
|
||||||
* @param $w
|
* @param int $w Width
|
||||||
|
* @return boolean True
|
||||||
*/
|
*/
|
||||||
function SetWidth($w)
|
function SetWidth($w)
|
||||||
{
|
{
|
||||||
@ -200,8 +215,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set title
|
||||||
*
|
*
|
||||||
* @param $title
|
* @param string $title Title
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetTitle($title)
|
function SetTitle($title)
|
||||||
{
|
{
|
||||||
@ -209,8 +226,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set data
|
||||||
*
|
*
|
||||||
* @param $data
|
* @param array $data Data
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetData($data)
|
function SetData($data)
|
||||||
{
|
{
|
||||||
@ -218,8 +237,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set type
|
||||||
*
|
*
|
||||||
* @param $type
|
* @param string $type Type
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetType($type)
|
function SetType($type)
|
||||||
{
|
{
|
||||||
@ -227,8 +248,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set legend
|
||||||
*
|
*
|
||||||
* @param $legend
|
* @param string $legend Legend
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetLegend($legend)
|
function SetLegend($legend)
|
||||||
{
|
{
|
||||||
@ -236,8 +259,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set min width
|
||||||
*
|
*
|
||||||
* @param $legendwidthmin
|
* @param int $legendwidthmin Min width
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetLegendWidthMin($legendwidthmin)
|
function SetLegendWidthMin($legendwidthmin)
|
||||||
{
|
{
|
||||||
@ -245,8 +270,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set max value
|
||||||
*
|
*
|
||||||
* @param $max
|
* @param int $max Max value
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetMaxValue($max)
|
function SetMaxValue($max)
|
||||||
{
|
{
|
||||||
@ -254,7 +281,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get max value
|
||||||
*
|
*
|
||||||
|
* @return int Max value
|
||||||
*/
|
*/
|
||||||
function GetMaxValue()
|
function GetMaxValue()
|
||||||
{
|
{
|
||||||
@ -262,8 +291,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set min value
|
||||||
*
|
*
|
||||||
* @param $min
|
* @param int $min Min value
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetMinValue($min)
|
function SetMinValue($min)
|
||||||
{
|
{
|
||||||
@ -271,7 +302,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get min value
|
||||||
*
|
*
|
||||||
|
* @return int Max value
|
||||||
*/
|
*/
|
||||||
function GetMinValue()
|
function GetMinValue()
|
||||||
{
|
{
|
||||||
@ -279,8 +312,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set height
|
||||||
*
|
*
|
||||||
* @param $h
|
* @param int $h Height
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetHeight($h)
|
function SetHeight($h)
|
||||||
{
|
{
|
||||||
@ -288,8 +323,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set shading
|
||||||
*
|
*
|
||||||
* @param $s
|
* @param string $s Shading
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetShading($s)
|
function SetShading($s)
|
||||||
{
|
{
|
||||||
@ -297,7 +334,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Reset bg color
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function ResetBgColor()
|
function ResetBgColor()
|
||||||
{
|
{
|
||||||
@ -305,7 +344,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Reset bgcolorgrid
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function ResetBgColorGrid()
|
function ResetBgColorGrid()
|
||||||
{
|
{
|
||||||
@ -313,7 +354,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Is graph ko
|
||||||
*
|
*
|
||||||
|
* @return string Error
|
||||||
*/
|
*/
|
||||||
function isGraphKo()
|
function isGraphKo()
|
||||||
{
|
{
|
||||||
@ -322,7 +365,7 @@ class DolGraph
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Definie la couleur de fond de l'image complete
|
* Define background color of complete image
|
||||||
*
|
*
|
||||||
* @param array $bg_color array(R,G,B) ou 'onglet' ou 'default'
|
* @param array $bg_color array(R,G,B) ou 'onglet' ou 'default'
|
||||||
* @return void
|
* @return void
|
||||||
@ -349,9 +392,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Definie la couleur de fond de la grille
|
* Define background color of grid
|
||||||
*
|
*
|
||||||
* @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default'
|
* @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default'
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetBgColorGrid($bg_colorgrid = array(255,255,255))
|
function SetBgColorGrid($bg_colorgrid = array(255,255,255))
|
||||||
{
|
{
|
||||||
@ -375,7 +419,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Reset data color
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function ResetDataColor()
|
function ResetDataColor()
|
||||||
{
|
{
|
||||||
@ -383,7 +429,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get max value
|
||||||
*
|
*
|
||||||
|
* @return int Max value
|
||||||
*/
|
*/
|
||||||
function GetMaxValueInData()
|
function GetMaxValueInData()
|
||||||
{
|
{
|
||||||
@ -406,7 +454,9 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Return min value of all data
|
||||||
*
|
*
|
||||||
|
* @return int Min value of all data
|
||||||
*/
|
*/
|
||||||
function GetMinValueInData()
|
function GetMinValueInData()
|
||||||
{
|
{
|
||||||
@ -668,7 +718,7 @@ class DolGraph
|
|||||||
// Generate file
|
// Generate file
|
||||||
$graph->draw($file);
|
$graph->draw($file);
|
||||||
|
|
||||||
$this->stringtoshow='<img src="'.$fileurl.'" title="'.dol_escape_htmltag($this->title?$this->title:$this->YLabel).'" alt="'.dol_escape_htmltag($this->title?$this->title:$this->YLabel).'">';
|
$this->_stringtoshow='<img src="'.$fileurl.'" title="'.dol_escape_htmltag($this->title?$this->title:$this->YLabel).'" alt="'.dol_escape_htmltag($this->title?$this->title:$this->YLabel).'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -679,7 +729,7 @@ class DolGraph
|
|||||||
*/
|
*/
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
return $this->stringtoshow;
|
return $this->_stringtoshow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user