Skip to content
Snippets Groups Projects
Commit d850290f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Si pas de legend on affiche pas.

parent 2b066a3b
No related branches found
No related tags found
No related merge requests found
......@@ -367,7 +367,7 @@ class DolGraph
if ($phplotversion >= 5) $top_space=25;
$left_space=80; // For y labels
$right_space=10; // If no legend
if (isset($this->Legend))
if (isset($this->Legend) && sizeof($this->Legend))
{
foreach($this->Legend as $key => $val)
{
......@@ -390,7 +390,7 @@ class DolGraph
if (isset($this->title)) $this->graph->SetTitle($this->title);
// Dfini position du graphe (et legende) au sein de l'image
if (isset($this->Legend))
if (isset($this->Legend) && sizeof($this->Legend))
{
$this->graph->SetLegendPixels($this->width - $right_space+8,40,'');
$this->graph->SetLegend($this->Legend);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment