Ne graph que si il y a des donnees
This commit is contained in:
parent
539c531834
commit
612caf7d85
@ -116,7 +116,6 @@ foreach ( $products as $id => $fdir)
|
||||
$legends[($row[3] - 1)] = $row[0];
|
||||
$num[($row[3] - 1)] = $row[1];
|
||||
$ca[($row[3] - 1)] = $row[2];
|
||||
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
@ -126,17 +125,19 @@ foreach ( $products as $id => $fdir)
|
||||
print $sql;
|
||||
}
|
||||
|
||||
$graph = new DolGraph();
|
||||
if ($i > 0)
|
||||
{
|
||||
$graph = new DolGraph();
|
||||
|
||||
$file = $fdir ."ventes-".$year."-".$id.".png";
|
||||
$title = "Ventes";
|
||||
$file = $fdir ."ventes-".$year."-".$id.".png";
|
||||
$title = "Ventes";
|
||||
|
||||
$graph->SetTitle($title);
|
||||
$graph->BarLineOneYearArtichow($file, $ca, $num, $legends);
|
||||
$graph->SetTitle($title);
|
||||
$graph->BarLineOneYearArtichow($file, $ca, $num, $legends);
|
||||
|
||||
|
||||
if ($verbose)
|
||||
print "$file\n";
|
||||
if ($verbose)
|
||||
print "$file\n";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Ventes annuelles
|
||||
@ -174,16 +175,19 @@ foreach ( $products as $id => $fdir)
|
||||
print $sql;
|
||||
}
|
||||
|
||||
$graph = new DolGraph();
|
||||
if ($i > 0)
|
||||
{
|
||||
$graph = new DolGraph();
|
||||
|
||||
$file = $fdir ."ventes-".$id.".png";
|
||||
$title = "Ventes";
|
||||
$file = $fdir ."ventes-".$id.".png";
|
||||
$title = "Ventes";
|
||||
|
||||
$graph->SetTitle($title);
|
||||
$graph->BarLineAnnualArtichow($file, $ca, $num, $legends);
|
||||
$graph->SetTitle($title);
|
||||
$graph->BarLineAnnualArtichow($file, $ca, $num, $legends);
|
||||
|
||||
if ($verbose)
|
||||
print "$file\n";
|
||||
if ($verbose)
|
||||
print "$file\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user