16 DEFINE(
'USE_CACHE',
false);
17 DEFINE(
'CACHE_DIR',
$myConfig->getConfigParam(
'sCompileDir'));
22 require_once
"$sIncPath/core/jpgraph/jpgraph.php";
23 require_once
"$sIncPath/core/jpgraph/jpgraph_bar.php";
24 require_once
"$sIncPath/core/jpgraph/jpgraph_line.php";
25 require_once
"$sIncPath/core/jpgraph/jpgraph_pie.php";
26 require_once
"$sIncPath/core/jpgraph/jpgraph_pie3d.php";
28 if (!class_exists(
'report_base')) {
42 protected $_oSmarty = null;
51 return $this->_sThisTemplate;
59 public function setSmarty($oSmarty)
61 $this->_oSmarty = $oSmarty;
69 public function getSmarty()
71 return $this->_oSmarty;
79 public function getWeekRange()
87 return array($iFrom - 1, $iTo + 1);
100 public function getGraph($iXSize, $iYSize, $sBackgroundImg = null, $sScaleType =
"textlin")
102 $sBackgroundImg = $sBackgroundImg ? $sBackgroundImg : $this->
getConfig()->getImageDir(
true) .
"/reportbgrnd.jpg";
105 $oGraph =
new Graph($iXSize, $iYSize);
107 $oGraph->setBackgroundImage($sBackgroundImg, BGIMG_FILLFRAME);
110 $oGraph->setScale($sScaleType);
113 $oGraph->xaxis->setLabelAlign(
'center',
'top',
'right');
116 $oGraph->yaxis->setLabelAlign(
'right',
'bottom');
119 $oGraph->setShadow();
122 $oGraph->title->setFont(FF_FONT1, FS_BOLD);