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