Fix js when no data

This commit is contained in:
Laurent Destailleur 2018-06-11 14:22:01 +02:00
parent 1d7d16649a
commit 5ae1395acd

View File

@ -880,10 +880,17 @@ class DolGraph
$this->stringtoshow.='<script id="'.$tag.'">'."\n"; $this->stringtoshow.='<script id="'.$tag.'">'."\n";
$this->stringtoshow.='$(function () {'."\n"; $this->stringtoshow.='$(function () {'."\n";
$i=$firstlot; $i=$firstlot;
while ($i < $nblot) if ($nblot < 0)
{ {
$this->stringtoshow.=$serie[$i]; $this->stringtoshow.='<!-- No series of data -->';
$i++; }
else
{
while ($i < $nblot)
{
$this->stringtoshow.=$serie[$i];
$i++;
}
} }
$this->stringtoshow.="\n"; $this->stringtoshow.="\n";