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];
|
$legends[($row[3] - 1)] = $row[0];
|
||||||
$num[($row[3] - 1)] = $row[1];
|
$num[($row[3] - 1)] = $row[1];
|
||||||
$ca[($row[3] - 1)] = $row[2];
|
$ca[($row[3] - 1)] = $row[2];
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
@ -126,6 +125,8 @@ foreach ( $products as $id => $fdir)
|
|||||||
print $sql;
|
print $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i > 0)
|
||||||
|
{
|
||||||
$graph = new DolGraph();
|
$graph = new DolGraph();
|
||||||
|
|
||||||
$file = $fdir ."ventes-".$year."-".$id.".png";
|
$file = $fdir ."ventes-".$year."-".$id.".png";
|
||||||
@ -134,9 +135,9 @@ foreach ( $products as $id => $fdir)
|
|||||||
$graph->SetTitle($title);
|
$graph->SetTitle($title);
|
||||||
$graph->BarLineOneYearArtichow($file, $ca, $num, $legends);
|
$graph->BarLineOneYearArtichow($file, $ca, $num, $legends);
|
||||||
|
|
||||||
|
|
||||||
if ($verbose)
|
if ($verbose)
|
||||||
print "$file\n";
|
print "$file\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Ventes annuelles
|
* Ventes annuelles
|
||||||
@ -174,6 +175,8 @@ foreach ( $products as $id => $fdir)
|
|||||||
print $sql;
|
print $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i > 0)
|
||||||
|
{
|
||||||
$graph = new DolGraph();
|
$graph = new DolGraph();
|
||||||
|
|
||||||
$file = $fdir ."ventes-".$id.".png";
|
$file = $fdir ."ventes-".$id.".png";
|
||||||
@ -184,6 +187,7 @@ foreach ( $products as $id => $fdir)
|
|||||||
|
|
||||||
if ($verbose)
|
if ($verbose)
|
||||||
print "$file\n";
|
print "$file\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user