Update dolgraph.class.php

This commit is contained in:
ptibogxiv 2019-11-20 12:43:49 +01:00 committed by GitHub
parent f1a9daf77e
commit 2c810988a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1124,7 +1124,20 @@ class DolGraph
$this->stringtoshow .= '</script>'."\n";
}
/**
* Output HTML string to total value
*
* @return string HTML string to total value
*/
public function total()
{
$value = 0;
foreach($this->data as $valarray) // Loop on each x
{
$value += $valarray[1];
}
return $value;
}
/**
* Output HTML string to show graph