Ne graph pas si les tables de donnees sont vides
This commit is contained in:
parent
3373c15faa
commit
590e010fc2
@ -724,6 +724,8 @@ class DolGraph
|
||||
|
||||
function BarLineOneYearArtichow($file='', $barvalues, $linevalues, $legends='')
|
||||
{
|
||||
if (( sizeof($barvalues) * sizeof($linevalues) ) > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT."/../external-libs/Artichow/BarPlot.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/../external-libs/Artichow/LinePlot.class.php";
|
||||
|
||||
@ -802,6 +804,7 @@ class DolGraph
|
||||
*/
|
||||
$graph->add($group);
|
||||
$graph->draw($file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -810,6 +813,9 @@ class DolGraph
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT."/../external-libs/Artichow/BarPlot.class.php";
|
||||
|
||||
if (sizeof($values) > 0)
|
||||
{
|
||||
|
||||
$graph = new Graph(500, 200);
|
||||
$graph->title->set($this->title);
|
||||
$graph->title->setFont(new Tuffy(10));
|
||||
@ -845,6 +851,7 @@ class DolGraph
|
||||
|
||||
$graph->add($plot);
|
||||
$graph->draw($file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user